diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2010-01-19 21:05:37 +1100 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2010-01-19 21:05:37 +1100 |
commit | 2107921000f4a186fed36e676d1ac089c8be1f99 (patch) | |
tree | 42f2188f058f8401d57f0d4c72063689a93e0419 /activeresource/test/cases | |
parent | ccb7d9def3c20037c9ed5989d8cae1ed68763f4f (diff) | |
parent | ed8501ef16fb2f5e4bd4d987740f5e5f62978400 (diff) | |
download | rails-2107921000f4a186fed36e676d1ac089c8be1f99.tar.gz rails-2107921000f4a186fed36e676d1ac089c8be1f99.tar.bz2 rails-2107921000f4a186fed36e676d1ac089c8be1f99.zip |
Merge branch 'master' of git://github.com/rails/rails into rails
Diffstat (limited to 'activeresource/test/cases')
-rw-r--r-- | activeresource/test/cases/validations_test.rb | 13 |
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 |