diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-26 12:00:41 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-26 12:00:41 +0000 |
commit | 39aa4cac86be56b95bf0a1f9ced8235093268227 (patch) | |
tree | 626d26b2608800ac4828d9e1313c62e2abd54e28 /test/functional/account_controller_test.rb | |
parent | 65b4d8a649d7c9aac6a34502017239799ac7e7b7 (diff) | |
download | redmine-39aa4cac86be56b95bf0a1f9ced8235093268227.tar.gz redmine-39aa4cac86be56b95bf0a1f9ced8235093268227.zip |
Moved tests about session reset to functional tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9014 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/account_controller_test.rb')
-rw-r--r-- | test/functional/account_controller_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/account_controller_test.rb b/test/functional/account_controller_test.rb index 5bf65b9ab..d501a3497 100644 --- a/test/functional/account_controller_test.rb +++ b/test/functional/account_controller_test.rb @@ -61,6 +61,13 @@ class AccountControllerTest < ActionController::TestCase assert_error_tag :content => /Something wrong/ end + def test_login_should_reset_session + @controller.expects(:reset_session).once + + post :login, :username => 'jsmith', :password => 'jsmith' + assert_response 302 + end + if Object.const_defined?(:OpenID) def test_login_with_openid_for_existing_user @@ -171,6 +178,14 @@ class AccountControllerTest < ActionController::TestCase assert_nil @request.session[:user_id] end + def test_logout_should_reset_session + @controller.expects(:reset_session).once + + @request.session[:user_id] = 2 + get :logout + assert_response 302 + end + def test_get_register_with_registration_on with_settings :self_registration => '3' do get :register |