aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/validations/presence_validation_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/test/cases/validations/presence_validation_test.rb')
-rw-r--r--activemodel/test/cases/validations/presence_validation_test.rb34
1 files changed, 0 insertions, 34 deletions
diff --git a/activemodel/test/cases/validations/presence_validation_test.rb b/activemodel/test/cases/validations/presence_validation_test.rb
index fbb008f9ff..510c13a7c3 100644
--- a/activemodel/test/cases/validations/presence_validation_test.rb
+++ b/activemodel/test/cases/validations/presence_validation_test.rb
@@ -70,38 +70,4 @@ class PresenceValidationTest < ActiveModel::TestCase
p[:karma] = "Cold"
assert p.valid?
end
-
- def test_validates_presence_of_with_allow_nil_option
- Topic.validates_presence_of(:title, :allow_nil => true)
-
- t = Topic.new(:title => "something")
- assert t.valid?
-
- t.title = ""
- assert t.invalid?
- assert_equal ["can't be blank"], t.errors[:title]
-
- t.title = " "
- assert t.invalid?
- assert_equal ["can't be blank"], t.errors[:title]
-
- t.title = nil
- assert t.valid?
- end
-
- def test_validates_presence_of_with_allow_blank_option
- Topic.validates_presence_of(:title, :allow_blank => true)
-
- t = Topic.new(:title => "something")
- assert t.valid?
-
- t.title = ""
- assert t.valid?
-
- t.title = " "
- assert t.valid?
-
- t.title = nil
- assert t.valid?
- end
end