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:
parent
b21f50d8ae
commit
4dd1eb27ef
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue