Fixes that user's last_login_on was not set when using registration with automatic activation.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2594 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
175ac71b2c
commit
4181f85962
|
@ -248,6 +248,7 @@ class AccountController < ApplicationController
|
|||
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 @@ class AccountTest < ActionController::IntegrationTest
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue