diff options
Diffstat (limited to 'test/models/user_test.rb')
| -rw-r--r-- | test/models/user_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/models/user_test.rb b/test/models/user_test.rb index 514bdea..feccce2 100644 --- a/test/models/user_test.rb +++ b/test/models/user_test.rb | |||
| @@ -118,6 +118,14 @@ class UserTest < ActiveSupport::TestCase | |||
| 118 | # Second login should now use password_digest. | 118 | # Second login should now use password_digest. |
| 119 | assert_equal user, User.authenticate("quentin", "monkey") | 119 | assert_equal user, User.authenticate("quentin", "monkey") |
| 120 | end | 120 | end |
| 121 | |||
| 122 | def test_migrated_user_can_be_updated_without_password | ||
| 123 | user = users(:quentin) | ||
| 124 | assert_equal user, User.authenticate("quentin", "monkey") | ||
| 125 | user.reload | ||
| 126 | |||
| 127 | assert user.update(:email => "quentin@example.org") | ||
| 128 | end | ||
| 121 | 129 | ||
| 122 | protected | 130 | protected |
| 123 | def create_user(options = {}) | 131 | def create_user(options = {}) |
