Permalink
Browse files

Update mysql adapter error message when disconnected

  • Loading branch information...
guilleiguaran committed Oct 23, 2016
1 parent e9801ec commit f13ec72664fd13d33d617103ca964a7592295854
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/test/cases/adapters/mysql2/connection_test.rb
@@ -68,15 +68,15 @@ def test_execute_after_disconnect
error = assert_raise(ActiveRecord::StatementInvalid) do
@connection.execute("SELECT 1")
end
assert_match(/closed MySQL connection/, error.message)
assert_match(/MySQL client is not connected/, error.message)
end
def test_quote_after_disconnect
@connection.disconnect!
error = assert_raise(Mysql2::Error) do
@connection.quote("string")
end
assert_match(/closed MySQL connection/, error.message)
assert_match(/MySQL client is not connected/, error.message)
end
def test_active_after_disconnect

0 comments on commit f13ec72

Please sign in to comment.