summaryrefslogtreecommitdiffstats
path: root/test/functional/account_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-18 21:26:30 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-18 21:26:30 +0000
commitec31b616982f137abdee8d0c6aa9dc4a6d103189 (patch)
treee4f5dc564be2b4ce5047a1f5acb2790fdc3b70ca /test/functional/account_controller_test.rb
parent1db54e228d98d20536133bf52a8af0ce67616dc3 (diff)
downloadredmine-ec31b616982f137abdee8d0c6aa9dc4a6d103189.tar.gz
redmine-ec31b616982f137abdee8d0c6aa9dc4a6d103189.zip
Removes calls to #assert_template and #assigns in functional tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@15695 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/account_controller_test.rb')
-rw-r--r--test/functional/account_controller_test.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/test/functional/account_controller_test.rb b/test/functional/account_controller_test.rb
index 3ef771f56..37a67d475 100644
--- a/test/functional/account_controller_test.rb
+++ b/test/functional/account_controller_test.rb
@@ -27,7 +27,6 @@ class AccountControllerTest < Redmine::ControllerTest
def test_get_login
get :login
assert_response :success
- assert_template 'login'
assert_select 'input[name=username]'
assert_select 'input[name=password]'
@@ -131,7 +130,6 @@ class AccountControllerTest < Redmine::ControllerTest
def test_login_with_wrong_password
post :login, :username => 'admin', :password => 'bad'
assert_response :success
- assert_template 'login'
assert_select 'div.flash.error', :text => /Invalid user or password/
assert_select 'input[name=username][value=admin]'
@@ -190,7 +188,6 @@ class AccountControllerTest < Redmine::ControllerTest
@request.session[:user_id] = 2
get :logout
assert_response :success
- assert_template 'logout'
assert_equal 2, @request.session[:user_id]
end
@@ -219,8 +216,6 @@ class AccountControllerTest < Redmine::ControllerTest
with_settings :self_registration => '3' do
get :register
assert_response :success
- assert_template 'register'
- assert_not_nil assigns(:user)
assert_select 'input[name=?]', 'user[password]'
assert_select 'input[name=?]', 'user[password_confirmation]'
@@ -232,8 +227,7 @@ class AccountControllerTest < Redmine::ControllerTest
@request.env['HTTP_ACCEPT_LANGUAGE'] = 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3'
get :register
assert_response :success
- assert_not_nil assigns(:user)
- assert_equal 'fr', assigns(:user).language
+
assert_select 'select[name=?]', 'user[language]' do
assert_select 'option[value=fr][selected=selected]'
end
@@ -387,7 +381,6 @@ class AccountControllerTest < Redmine::ControllerTest
get :lost_password, :token => token.value
assert_response :success
- assert_template 'password_recovery'
assert_select 'input[type=hidden][name=token][value=?]', token.value
end
@@ -429,7 +422,6 @@ class AccountControllerTest < Redmine::ControllerTest
post :lost_password, :token => token.value, :new_password => 'newpass', :new_password_confirmation => 'wrongpass'
assert_response :success
- assert_template 'password_recovery'
assert_not_nil Token.find_by_id(token.id), "Token was deleted"
assert_select 'input[type=hidden][name=token][value=?]', token.value