Permalink
Browse files

Merge pull request #13446 from kuldeepaggarwal/resolver-test-cases

Resolver test cases
  • Loading branch information...
2 parents 72503e6 + 34f17b8 commit 00fc64a6dce4930e5f762c1c1d742addc0cf9e42 @senny senny committed Dec 23, 2013
Showing with 10 additions and 0 deletions.
  1. +10 −0 activerecord/test/cases/connection_specification/resolver_test.rb
@@ -57,6 +57,16 @@ def test_descriptive_error_message_when_adapter_is_missing
assert_match "Could not load 'active_record/connection_adapters/non-existing_adapter'", error.message
end
+
+ def test_url_host_db_for_sqlite3
+ spec = resolve 'sqlite3://foo:bar@dburl:9000/foo_test'
+ assert_equal('/foo_test', spec[:database])
+ end
+
+ def test_url_host_memory_db_for_sqlite3
+ spec = resolve 'sqlite3://foo:bar@dburl:9000/:memory:'
+ assert_equal(':memory:', spec[:database])
+ end
end
end
end

0 comments on commit 00fc64a

Please sign in to comment.