aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/finder_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/finder_test.rb')
-rw-r--r--activerecord/test/finder_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb
index 1e6e4cf6cd..eb1e4d639c 100644
--- a/activerecord/test/finder_test.rb
+++ b/activerecord/test/finder_test.rb
@@ -460,6 +460,12 @@ class FinderTest < Test::Unit::TestCase
end
end
+ # http://dev.rubyonrails.org/ticket/6778
+ def test_find_ignores_previously_inserted_record
+ post = Post.create!
+ assert_equal [], Post.find_all_by_id(nil)
+ end
+
def test_find_by_empty_ids
assert_equal [], Post.find([])
end