diff options
Diffstat (limited to 'activerecord/test/cases/finder_test.rb')
-rw-r--r-- | activerecord/test/cases/finder_test.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb index e936c56ab8..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 @@ -565,7 +563,7 @@ class FinderTest < ActiveRecord::TestCase assert_nil Topic.offset(4).second_to_last assert_nil Topic.offset(5).second_to_last - #test with limit + # test with limit assert_nil Topic.limit(1).second assert_nil Topic.limit(1).second_to_last end @@ -1238,7 +1236,7 @@ class FinderTest < ActiveRecord::TestCase test "find_by with associations" do assert_equal authors(:david), Post.find_by(author: authors(:david)).author - assert_equal authors(:mary) , Post.find_by(author: authors(:mary)).author + assert_equal authors(:mary), Post.find_by(author: authors(:mary)).author end test "find_by doesn't have implicit ordering" do |