1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add missing test case for find with a large number

This commit is contained in:
Ryuta Kamizono 2018-06-22 04:28:27 +09:00
parent b21f50d8ae
commit 4dd1eb27ef

View file

@ -355,6 +355,12 @@ class FinderTest < ActiveRecord::TestCase
end
def test_find_on_relation_with_large_number
assert_raises(ActiveRecord::RecordNotFound) do
Topic.where("1=1").find(9999999999999999999999999999999)
end
end
def test_find_by_on_relation_with_large_number
assert_nil Topic.where("1=1").find_by(id: 9999999999999999999999999999999)
end