aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/test/cases/validations_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource/test/cases/validations_test.rb')
-rw-r--r--activeresource/test/cases/validations_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activeresource/test/cases/validations_test.rb b/activeresource/test/cases/validations_test.rb
index bd79fdd952..671d1ea8f0 100644
--- a/activeresource/test/cases/validations_test.rb
+++ b/activeresource/test/cases/validations_test.rb
@@ -48,6 +48,12 @@ class ValidationsTest < ActiveModel::TestCase
assert p.save, "should have saved after fixing the validation, but had: #{p.errors.inspect}"
end
+ def test_client_side_validation_maximum
+ project = Project.new(:description => '123456789012345')
+ assert ! project.valid?
+ assert_equal ['is too long (maximum is 10 characters)'], project.errors[:description]
+ end
+
protected
# quickie helper to create a new project with all the required