diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-05-08 11:14:45 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-05-08 11:14:45 +0200 |
commit | f1da919a05488e0647886a9325caa1f0f89d2cad (patch) | |
tree | d7d0a812a8285b7e4f9730a6655c9c3113fa526b /activerecord/test | |
parent | 438a13890019057021385015aa89f02f07cdc53d (diff) | |
download | rails-f1da919a05488e0647886a9325caa1f0f89d2cad.tar.gz rails-f1da919a05488e0647886a9325caa1f0f89d2cad.tar.bz2 rails-f1da919a05488e0647886a9325caa1f0f89d2cad.zip |
remove duplicate test.
The old `test_create_bang_returns_falsy_when_join_record_has_errors` had
a missleading name and was a duplicate of
`test_save_should_not_raise_exception_when_join_record_has_errors`.
Since it had an assertion on the return value I renamed it accordingly
and got rid of the duplicate test.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/associations/has_many_through_associations_test.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb index 9734ea2217..190cef55c4 100644 --- a/activerecord/test/cases/associations/has_many_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb @@ -1040,14 +1040,6 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase end end - def test_save_should_not_raise_exception_when_join_record_has_errors - repair_validations(Categorization) do - Categorization.validate { |r| r.errors[:base] << 'Invalid Categorization' } - c = Category.create(:name => 'Fishing', :authors => [Author.first]) - c.save - end - end - def test_assign_array_to_new_record_builds_join_records c = Category.new(:name => 'Fishing', :authors => [Author.first]) assert_equal 1, c.categorizations.size @@ -1072,11 +1064,11 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase end end - def test_create_bang_returns_falsy_when_join_record_has_errors + def test_save_returns_falsy_when_join_record_has_errors repair_validations(Categorization) do Categorization.validate { |r| r.errors[:base] << 'Invalid Categorization' } c = Category.new(:name => 'Fishing', :authors => [Author.first]) - assert !c.save + assert_not c.save end end |