Browse files

Merge pull request #11049 from neerajdotname/no-need-of-large-number

fix bad test by making number that fits for integer
  • Loading branch information...
2 parents 3f34f75 + 6741a0a commit cbc2e7987e71ff34149acaf1f9f3205f30b67174 @jonleighton jonleighton committed Jun 21, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 activerecord/test/cases/associations/inverse_associations_test.rb
View
6 activerecord/test/cases/associations/inverse_associations_test.rb
@@ -402,9 +402,13 @@ def test_parent_instance_should_find_child_instance_using_child_instance_id_when
end
def test_raise_record_not_found_error_when_invalid_ids_are_passed
+ # delete all interest records to ensure that hard coded invalid_id(s)
+ # are indeed invalid.
+ Interest.delete_all
+
man = Man.create!
- invalid_id = 2394823094892348920348523452345
+ invalid_id = 245324523
assert_raise(ActiveRecord::RecordNotFound) { man.interests.find(invalid_id) }
invalid_ids = [8432342, 2390102913, 2453245234523452]

0 comments on commit cbc2e79

Please sign in to comment.