diff options
Diffstat (limited to 'activerecord/test/cases/validations/absence_validation_test.rb')
-rw-r--r-- | activerecord/test/cases/validations/absence_validation_test.rb | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/activerecord/test/cases/validations/absence_validation_test.rb b/activerecord/test/cases/validations/absence_validation_test.rb index 180acbcb6a..c0b3750bcc 100644 --- a/activerecord/test/cases/validations/absence_validation_test.rb +++ b/activerecord/test/cases/validations/absence_validation_test.rb @@ -57,22 +57,6 @@ class AbsenceValidationTest < ActiveRecord::TestCase assert_nothing_raised { boy_klass.new(face: face_with_to_a).valid? } end - def test_does_not_validate_if_parent_record_is_validate_false - repair_validations(Interest) do - Interest.validates_absence_of(:topic) - interest = Interest.new(topic: Topic.new(title: "Math")) - interest.save!(validate: false) - assert interest.persisted? - - man = Man.new(interest_ids: [interest.id]) - man.save! - - assert_equal man.interests.size, 1 - assert interest.valid? - assert man.valid? - end - end - def test_validates_absence_of_virtual_attribute_on_model repair_validations(Interest) do Interest.send(:attr_accessor, :token) |