aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/validations
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/test/cases/validations')
-rw-r--r--activemodel/test/cases/validations/length_validation_test.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/activemodel/test/cases/validations/length_validation_test.rb b/activemodel/test/cases/validations/length_validation_test.rb
index f3ef5e648a..99d0268b67 100644
--- a/activemodel/test/cases/validations/length_validation_test.rb
+++ b/activemodel/test/cases/validations/length_validation_test.rb
@@ -221,10 +221,8 @@ class LengthValidationTest < ActiveModel::TestCase
end
def test_validates_length_of_nasty_params
- assert_raise(ArgumentError) { Topic.validates_length_of(:title, :minimum=>6, :maximum=>9) }
- assert_raise(ArgumentError) { Topic.validates_length_of(:title, :within=>6, :maximum=>9) }
- assert_raise(ArgumentError) { Topic.validates_length_of(:title, :within=>6, :minimum=>9) }
- assert_raise(ArgumentError) { Topic.validates_length_of(:title, :within=>6, :is=>9) }
+ assert_raise(ArgumentError) { Topic.validates_length_of(:title, :is=>-6) }
+ assert_raise(ArgumentError) { Topic.validates_length_of(:title, :within=>6) }
assert_raise(ArgumentError) { Topic.validates_length_of(:title, :minimum=>"a") }
assert_raise(ArgumentError) { Topic.validates_length_of(:title, :maximum=>"a") }
assert_raise(ArgumentError) { Topic.validates_length_of(:title, :within=>"a") }