diff options
author | Oscar Del Ben <info@oscardelben.com> | 2012-04-25 15:43:29 +0200 |
---|---|---|
committer | Oscar Del Ben <info@oscardelben.com> | 2012-04-25 15:43:29 +0200 |
commit | 4179141a012c84afa4756aa565aca3a07e4693fa (patch) | |
tree | baf0a7c97fda49455408ee86b73272911acd14f8 /activemodel/test | |
parent | ee4e7125a61c703332a8d591a0aee917ba828e62 (diff) | |
parent | 4a3ce153f1e05c9c590e9ee74e818649336d929f (diff) | |
download | rails-4179141a012c84afa4756aa565aca3a07e4693fa.tar.gz rails-4179141a012c84afa4756aa565aca3a07e4693fa.tar.bz2 rails-4179141a012c84afa4756aa565aca3a07e4693fa.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activemodel/test')
-rw-r--r-- | activemodel/test/cases/observing_test.rb | 2 | ||||
-rw-r--r-- | activemodel/test/cases/secure_password_test.rb | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/activemodel/test/cases/observing_test.rb b/activemodel/test/cases/observing_test.rb index f6ec24ae57..df070d2d8e 100644 --- a/activemodel/test/cases/observing_test.rb +++ b/activemodel/test/cases/observing_test.rb @@ -73,7 +73,7 @@ class ObservingTest < ActiveModel::TestCase test "passes observers to subclasses" do FooObserver.instance bar = Class.new(Foo) - assert_equal Foo.count_observers, bar.count_observers + assert_equal Foo.observers_count, bar.observers_count end end diff --git a/activemodel/test/cases/secure_password_test.rb b/activemodel/test/cases/secure_password_test.rb index 4338a3fc53..c451cc1aca 100644 --- a/activemodel/test/cases/secure_password_test.rb +++ b/activemodel/test/cases/secure_password_test.rb @@ -19,6 +19,12 @@ class SecurePasswordTest < ActiveModel::TestCase assert !@user.valid?, 'user should be invalid' end + test "blank password doesn't override previous password" do + @user.password = 'test' + @user.password = '' + assert_equal @user.password, 'test' + end + test "password must be present" do assert !@user.valid? assert_equal 1, @user.errors.size |