@@ -248,6 +248,7 class AccountController < ApplicationController | |||||
248 | def register_automatically(user, &block) |
|
248 | def register_automatically(user, &block) | |
249 | # Automatic activation |
|
249 | # Automatic activation | |
250 | user.status = User::STATUS_ACTIVE |
|
250 | user.status = User::STATUS_ACTIVE | |
|
251 | user.last_login_on = Time.now | |||
251 | if user.save |
|
252 | if user.save | |
252 | self.logged_user = user |
|
253 | self.logged_user = user | |
253 | flash[:notice] = l(:notice_account_activated) |
|
254 | flash[:notice] = l(:notice_account_activated) |
@@ -110,7 +110,10 class AccountTest < ActionController::IntegrationTest | |||||
110 | assert_response :success |
|
110 | assert_response :success | |
111 | assert_template 'my/account' |
|
111 | assert_template 'my/account' | |
112 |
|
112 | |||
113 |
|
|
113 | user = User.find_by_login('newuser') | |
|
114 | assert_not_nil user | |||
|
115 | assert user.active? | |||
|
116 | assert_not_nil user.last_login_on | |||
114 | end |
|
117 | end | |
115 |
|
118 | |||
116 | def test_register_with_manual_activation |
|
119 | def test_register_with_manual_activation |
General Comments 0
You need to be logged in to leave comments.
Login now