mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Show the failed queries in test_has_one_does_not_use_order_by
For investigating the cause of failure. https://travis-ci.org/rails/rails/jobs/287474883#L797-L799
This commit is contained in:
parent
d1695b4fe4
commit
3d1ff79742
1 changed files with 2 additions and 1 deletions
|
@ -30,7 +30,8 @@ class HasOneAssociationsTest < ActiveRecord::TestCase
|
|||
ActiveRecord::SQLCounter.clear_log
|
||||
companies(:first_firm).account
|
||||
ensure
|
||||
assert ActiveRecord::SQLCounter.log_all.all? { |sql| /order by/i !~ sql }, "ORDER BY was used in the query"
|
||||
log_all = ActiveRecord::SQLCounter.log_all
|
||||
assert log_all.all? { |sql| /order by/i !~ sql }, "ORDER BY was used in the query: #{log_all}"
|
||||
end
|
||||
|
||||
def test_has_one_cache_nils
|
||||
|
|
Loading…
Reference in a new issue