Skip to content

Commit

Permalink
Add missing test case for find with a large number
Browse files Browse the repository at this point in the history
  • Loading branch information
kamipo committed Jun 21, 2018
1 parent b21f50d commit 4dd1eb2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions activerecord/test/cases/finder_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,12 @@ def test_find_by_id_with_large_number
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

Expand Down

0 comments on commit 4dd1eb2

Please sign in to comment.