diff options
author | schneems <richard.schneeman@gmail.com> | 2014-03-11 22:23:21 -0500 |
---|---|---|
committer | schneems <richard.schneeman@gmail.com> | 2014-03-14 11:33:54 -0500 |
commit | 7f17019e079bb9e6352f11d537633ddf10ea5903 (patch) | |
tree | 979465bd8ac90c9ef3d7225d6050252e62635826 /activerecord/test | |
parent | eaa19cc5761f8f86fb37683984d385a8707ad8b3 (diff) | |
download | rails-7f17019e079bb9e6352f11d537633ddf10ea5903.tar.gz rails-7f17019e079bb9e6352f11d537633ddf10ea5903.tar.bz2 rails-7f17019e079bb9e6352f11d537633ddf10ea5903.zip |
Allow custom JDBC urls
mitigates #14323
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/connection_adapters/connection_handler_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/connection_adapters/connection_handler_test.rb b/activerecord/test/cases/connection_adapters/connection_handler_test.rb index 599e8c762c..68ddc08f89 100644 --- a/activerecord/test/cases/connection_adapters/connection_handler_test.rb +++ b/activerecord/test/cases/connection_adapters/connection_handler_test.rb @@ -17,6 +17,12 @@ module ActiveRecord ENV["DATABASE_URL"] = @previous_database_url end + def test_jdbc_url + config = { "production" => { "url" => "jdbc:postgres://localhost/foo" } } + actual = klass.new(config).resolve + assert_equal config, actual + end + def test_environment_does_not_exist_in_config_url_does_exist ENV['DATABASE_URL'] = "postgres://localhost/foo" config = { "not_production" => { "adapter" => "not_postgres", "database" => "not_foo" } } |