From 34f17b871e3ec4f8924e0b64ef4acf3f5356d34a Mon Sep 17 00:00:00 2001 From: Kuldeep Aggarwal Date: Mon, 23 Dec 2013 16:45:00 +0530 Subject: added test cases for Resolver#connection_url_to_hash --- .../test/cases/connection_specification/resolver_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'activerecord/test/cases') diff --git a/activerecord/test/cases/connection_specification/resolver_test.rb b/activerecord/test/cases/connection_specification/resolver_test.rb index c8dfc3244b..528de07eab 100644 --- a/activerecord/test/cases/connection_specification/resolver_test.rb +++ b/activerecord/test/cases/connection_specification/resolver_test.rb @@ -57,6 +57,16 @@ module ActiveRecord 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 -- cgit v1.2.3