Permalink
Browse files

Fixes that user's last_login_on was not set when using registration w…

…ith automatic activation.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2594 e93f8b46-1217-0410-a6f0-8f06a7374b81
  • Loading branch information...
jplang committed Mar 15, 2009
1 parent 175ac71 commit 4181f859623c41a679ae5b9e8453c750778eb8de
Showing with 5 additions and 1 deletion.
  1. +1 −0 app/controllers/account_controller.rb
  2. +4 −1 test/integration/account_test.rb
@@ -248,6 +248,7 @@ def register_by_email_activation(user, &block)
def register_automatically(user, &block)
# Automatic activation
user.status = User::STATUS_ACTIVE
+ user.last_login_on = Time.now
if user.save
self.logged_user = user
flash[:notice] = l(:notice_account_activated)
@@ -110,7 +110,10 @@ def test_register_with_automatic_activation
assert_response :success
assert_template 'my/account'
- assert User.find_by_login('newuser').active?
+ user = User.find_by_login('newuser')
+ assert_not_nil user
+ assert user.active?
+ assert_not_nil user.last_login_on
end
def test_register_with_manual_activation

0 comments on commit 4181f85

Please sign in to comment.