aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/test/cases
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-01-17 14:22:27 +0100
committerJosé Valim <jose.valim@gmail.com>2010-01-17 14:22:34 +0100
commitc0d31ca41b2f019d3bf940ac79f104c412b115bf (patch)
tree4946099ab3a6cdffbb82a3fd78e77a7f4dccef58 /activeresource/test/cases
parent020e656447a7cc2ce9cbf83483ab3b31730a565e (diff)
downloadrails-c0d31ca41b2f019d3bf940ac79f104c412b115bf.tar.gz
rails-c0d31ca41b2f019d3bf940ac79f104c412b115bf.tar.bz2
rails-c0d31ca41b2f019d3bf940ac79f104c412b115bf.zip
save(false) is gone, use save(:validate => false) instead.
Diffstat (limited to 'activeresource/test/cases')
-rw-r--r--activeresource/test/cases/validations_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/activeresource/test/cases/validations_test.rb b/activeresource/test/cases/validations_test.rb
index c05f625fb7..82546424f2 100644
--- a/activeresource/test/cases/validations_test.rb
+++ b/activeresource/test/cases/validations_test.rb
@@ -30,6 +30,19 @@ class ValidationsTest < ActiveModel::TestCase
assert_raise(ActiveResource::ResourceInvalid) { p.save! }
end
+ def test_save_without_validation
+ p = new_project(:name => nil)
+ assert !p.save
+ assert p.save(:validate => false)
+ end
+
+ def test_deprecated_save_without_validation
+ p = new_project(:name => nil)
+ assert !p.save
+ assert_deprecated do
+ assert p.save(false)
+ end
+ end
def test_validate_callback
# we have a callback ensuring the description is longer than three letters