aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/unconnected_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/unconnected_test.rb')
-rw-r--r--activerecord/test/cases/unconnected_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/unconnected_test.rb b/activerecord/test/cases/unconnected_test.rb
index 9eefc32745..f0a0e7f805 100644
--- a/activerecord/test/cases/unconnected_test.rb
+++ b/activerecord/test/cases/unconnected_test.rb
@@ -29,6 +29,14 @@ class TestUnconnectedAdapter < ActiveRecord::TestCase
end
end
+ def test_error_message_when_connection_not_established
+ error = assert_raise(ActiveRecord::ConnectionNotEstablished) do
+ TestRecord.find(1)
+ end
+
+ assert_equal "No connection pool with 'primary' found.", error.message
+ end
+
def test_underlying_adapter_no_longer_active
assert_not @underlying.active?, "Removed adapter should no longer be active"
end