aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/finder_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/finder_test.rb')
-rw-r--r--activerecord/test/cases/finder_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb
index 49015133da..5da8603070 100644
--- a/activerecord/test/cases/finder_test.rb
+++ b/activerecord/test/cases/finder_test.rb
@@ -542,7 +542,7 @@ class FinderTest < ActiveRecord::TestCase
end
def test_find_all_by_array_attribute
- assert_equal 2, Topic.find_all_by_title(["The First Topic", "The Second Topic's of the day"]).size
+ assert_equal 2, Topic.find_all_by_title(["The First Topic", "The Second Topic of the day"]).size
end
def test_find_all_by_boolean_attribute
@@ -551,7 +551,7 @@ class FinderTest < ActiveRecord::TestCase
assert topics.include?(topics(:first))
topics = Topic.find_all_by_approved(true)
- assert_equal 1, topics.size
+ assert_equal 3, topics.size
assert topics.include?(topics(:second))
end
@@ -563,8 +563,8 @@ class FinderTest < ActiveRecord::TestCase
def test_find_all_by_nil_attribute
topics = Topic.find_all_by_last_read nil
- assert_equal 1, topics.size
- assert_nil topics[0].last_read
+ assert_equal 3, topics.size
+ assert topics.collect(&:last_read).all?(&:nil?)
end
def test_find_by_nil_and_not_nil_attributes