Skip to content

Commit dc42f25

Browse files
committed
Fix mysql execute test after disconnect.
Previously it used to be ActiveRecord::Result, now it seems to be an array
1 parent d8ec034 commit dc42f25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/db/mysql/simple_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,10 @@ def test_execute_after_disconnect
451451

452452
# active record change of behaviour 7.1, reconnects on query execution.
453453
result = assert_nothing_raised do
454-
connection.execute('SELECT 1 + 2')
454+
connection.execute('SELECT 1 + 2 as total')
455455
end
456456

457-
assert_equal 3, result.rows.flatten.first
457+
assert_equal 3, result.first['total']
458458
ensure
459459
connection.reconnect!
460460
end

0 commit comments

Comments
 (0)