aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-04 00:32:18 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-04 11:58:43 -0300
commitefdc20f36ccc37afbb2705eb9acca76dd8aabd4f (patch)
treefe161a52467b1316109df366d5fbe76c6e87fde7 /activerecord/test/cases
parenta939506f297b667291480f26fa32a373a18ae06a (diff)
downloadrails-efdc20f36ccc37afbb2705eb9acca76dd8aabd4f.tar.gz
rails-efdc20f36ccc37afbb2705eb9acca76dd8aabd4f.tar.bz2
rails-efdc20f36ccc37afbb2705eb9acca76dd8aabd4f.zip
Remove deprecated access to connection specification using a string acessor.
Now all strings will be handled as a URL.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/connection_adapters/merge_and_resolve_default_url_config_test.rb38
1 files changed, 0 insertions, 38 deletions
diff --git a/activerecord/test/cases/connection_adapters/merge_and_resolve_default_url_config_test.rb b/activerecord/test/cases/connection_adapters/merge_and_resolve_default_url_config_test.rb
index 37ad469476..9ee92a3cd2 100644
--- a/activerecord/test/cases/connection_adapters/merge_and_resolve_default_url_config_test.rb
+++ b/activerecord/test/cases/connection_adapters/merge_and_resolve_default_url_config_test.rb
@@ -51,34 +51,6 @@ module ActiveRecord
assert_equal expected, actual
end
- def test_resolver_with_database_uri_and_and_current_env_string_key
- ENV['DATABASE_URL'] = "postgres://localhost/foo"
- config = { "default_env" => { "adapter" => "not_postgres", "database" => "not_foo" } }
- actual = assert_deprecated { resolve_spec("default_env", config) }
- expected = { "adapter"=>"postgresql", "database"=>"foo", "host"=>"localhost" }
- assert_equal expected, actual
- end
-
- def test_resolver_with_database_uri_and_and_current_env_string_key_and_rails_env
- ENV['DATABASE_URL'] = "postgres://localhost/foo"
- ENV['RAILS_ENV'] = "foo"
-
- config = { "not_production" => {"adapter" => "not_postgres", "database" => "not_foo" } }
- actual = assert_deprecated { resolve_spec("foo", config) }
- expected = { "adapter" => "postgresql", "database" => "foo", "host" => "localhost" }
- assert_equal expected, actual
- end
-
- def test_resolver_with_database_uri_and_and_current_env_string_key_and_rack_env
- ENV['DATABASE_URL'] = "postgres://localhost/foo"
- ENV['RACK_ENV'] = "foo"
-
- config = { "not_production" => {"adapter" => "not_postgres", "database" => "not_foo" } }
- actual = assert_deprecated { resolve_spec("foo", config) }
- expected = { "adapter" => "postgresql", "database" => "foo", "host" => "localhost" }
- assert_equal expected, actual
- end
-
def test_resolver_with_database_uri_and_known_key
ENV['DATABASE_URL'] = "postgres://localhost/foo"
config = { "production" => { "adapter" => "not_postgres", "database" => "not_foo", "host" => "localhost" } }
@@ -95,16 +67,6 @@ module ActiveRecord
end
end
- def test_resolver_with_database_uri_and_unknown_string_key
- ENV['DATABASE_URL'] = "postgres://localhost/foo"
- config = { "not_production" => { "adapter" => "not_postgres", "database" => "not_foo" } }
- assert_deprecated do
- assert_raises AdapterNotSpecified do
- resolve_spec("production", config)
- end
- end
- end
-
def test_resolver_with_database_uri_and_supplied_url
ENV['DATABASE_URL'] = "not-postgres://not-localhost/not_foo"
config = { "production" => { "adapter" => "also_not_postgres", "database" => "also_not_foo" } }