aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorPrathamesh Sonpatki <csonpatki@gmail.com>2017-12-17 13:17:28 +0530
committerPrathamesh Sonpatki <csonpatki@gmail.com>2017-12-19 12:53:58 +0530
commiteaf639c76b2df54b8ddf6741a91b34d113eae0cf (patch)
treee983446fdb175928ed1f0b6bdff0ea20ce17faab /activerecord
parentfd1304d2aaf5e21df0aac2e8e3f7becdaad15b19 (diff)
downloadrails-eaf639c76b2df54b8ddf6741a91b34d113eae0cf.tar.gz
rails-eaf639c76b2df54b8ddf6741a91b34d113eae0cf.tar.bz2
rails-eaf639c76b2df54b8ddf6741a91b34d113eae0cf.zip
assert_nothing_raised not required here, we can assert directly for the actual result
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/finder_test.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb
index 62d5d88fcc..8369a10b5a 100644
--- a/activerecord/test/cases/finder_test.rb
+++ b/activerecord/test/cases/finder_test.rb
@@ -287,10 +287,8 @@ class FinderTest < ActiveRecord::TestCase
end
def test_exists_should_reference_correct_aliases_while_joining_tables_of_has_many_through_association
- assert_nothing_raised do
- developer = developers(:david)
- developer.ratings.includes(comment: :post).where(posts: { id: 1 }).exists?
- end
+ developer = developers(:david)
+ assert_not_predicate developer.ratings.includes(comment: :post).where(posts: { id: 1 }), :exists?
end
def test_exists_with_empty_table_and_no_args_given