Skip to content

Commit 636c38f

Browse files
authored
Updated error message in test to include sqlserver (#1176)
1 parent 86851d3 commit 636c38f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Diff for: test/cases/coerced_tests.rb

+18
Original file line numberDiff line numberDiff line change
@@ -2635,3 +2635,21 @@ def test_remove_check_constraint_coerced
26352635
end
26362636
end
26372637
end
2638+
2639+
module ActiveRecord
2640+
module ConnectionAdapters
2641+
class PoolConfig
2642+
class ResolverTest < ActiveRecord::TestCase
2643+
# SQL Server was not included in the list of available adapters in the error message.
2644+
coerce_tests! :test_url_invalid_adapter
2645+
def test_url_invalid_adapter_coerced
2646+
error = assert_raises(AdapterNotFound) do
2647+
Base.connection_handler.establish_connection "ridiculous://foo?encoding=utf8"
2648+
end
2649+
2650+
assert_match "Database configuration specifies nonexistent 'ridiculous' adapter. Available adapters are: abstract, fake, mysql2, postgresql, sqlite3, sqlserver, trilogy. Ensure that the adapter is spelled correctly in config/database.yml and that you've added the necessary adapter gem to your Gemfile if it's not in the list of available adapters.", error.message
2651+
end
2652+
end
2653+
end
2654+
end
2655+
end

0 commit comments

Comments
 (0)