diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2017-12-19 08:12:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-19 08:12:32 -0500 |
commit | 1ba72fd66be3c60c916c7a779c5001ed38675333 (patch) | |
tree | d1fc4f6ca6e4289688857e7564b4d756212fc3d7 /activerecord/test | |
parent | 0863335453bcf3b27c95cb8291cb6411b3e6f4ab (diff) | |
parent | eaf639c76b2df54b8ddf6741a91b34d113eae0cf (diff) | |
download | rails-1ba72fd66be3c60c916c7a779c5001ed38675333.tar.gz rails-1ba72fd66be3c60c916c7a779c5001ed38675333.tar.bz2 rails-1ba72fd66be3c60c916c7a779c5001ed38675333.zip |
Merge pull request #31492 from prathamesh-sonpatki/rm-assert-nothing-raised
assert_nothing_raised not required here, we can assert directly for the actual result
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/finder_test.rb | 6 |
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 |