From f1da919a05488e0647886a9325caa1f0f89d2cad Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Fri, 8 May 2015 11:14:45 +0200 Subject: 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. --- .../cases/associations/has_many_through_associations_test.rb | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'activerecord/test/cases') 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 -- cgit v1.2.3