mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
some databases do not have bind params (mysql2) so take that in to account
This commit is contained in:
parent
5e5118aa8b
commit
2c4c5231bb
1 changed files with 6 additions and 2 deletions
|
@ -26,8 +26,12 @@ if ActiveRecord::Base.connection.supports_explain?
|
|||
|
||||
sql, binds = queries[0]
|
||||
assert_match "SELECT", sql
|
||||
assert_equal "honda", binds.flatten.last
|
||||
assert_equal 1, binds.length
|
||||
if binds.any?
|
||||
assert_equal 1, binds.length
|
||||
assert_equal "honda", binds.flatten.last
|
||||
else
|
||||
assert_match 'honda', sql
|
||||
end
|
||||
end
|
||||
|
||||
def test_exec_explain_with_no_binds
|
||||
|
|
Loading…
Reference in a new issue