Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added test cases for Resolver#connection_url_to_hash

  • Loading branch information...
commit 34f17b871e3ec4f8924e0b64ef4acf3f5356d34a 1 parent 6f4a556
@kuldeepaggarwal kuldeepaggarwal authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 activerecord/test/cases/connection_specification/resolver_test.rb
View
10 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
Please sign in to comment.
Something went wrong with that request. Please try again.