diff options
author | Jon Leighton <j@jonathanleighton.com> | 2013-06-21 10:58:43 -0700 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2013-06-21 10:58:43 -0700 |
commit | cbc2e7987e71ff34149acaf1f9f3205f30b67174 (patch) | |
tree | 929c218064a7b7d145b7c3acd27c97e64f21680b /activerecord | |
parent | 3f34f75d72775a38a2a5a150b510b93490e2a024 (diff) | |
parent | 6741a0a18761ca9cbbdaeefe70f4d53d68fdf1b5 (diff) | |
download | rails-cbc2e7987e71ff34149acaf1f9f3205f30b67174.tar.gz rails-cbc2e7987e71ff34149acaf1f9f3205f30b67174.tar.bz2 rails-cbc2e7987e71ff34149acaf1f9f3205f30b67174.zip |
Merge pull request #11049 from neerajdotname/no-need-of-large-number
fix bad test by making number that fits for integer
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/associations/inverse_associations_test.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations/inverse_associations_test.rb b/activerecord/test/cases/associations/inverse_associations_test.rb index b1f0be3204..d961ceca1d 100644 --- a/activerecord/test/cases/associations/inverse_associations_test.rb +++ b/activerecord/test/cases/associations/inverse_associations_test.rb @@ -402,9 +402,13 @@ class InverseHasManyTests < ActiveRecord::TestCase 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] |