diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-11-12 12:30:57 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-11-12 12:30:57 +0000 |
commit | 44e51105b17ef847f571ae4e3c0380a60155e7ae (patch) | |
tree | c06058cd20d2e6b8fe8c0c56c1f1232d015f32d2 /test | |
parent | c1a203267bc2c85f3d0a3e61f74d848c0c078842 (diff) | |
download | redmine-44e51105b17ef847f571ae4e3c0380a60155e7ae.tar.gz redmine-44e51105b17ef847f571ae4e3c0380a60155e7ae.zip |
fix source indent of SessionsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@20339 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/sessions_controller_test.rb | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/test/functional/sessions_controller_test.rb b/test/functional/sessions_controller_test.rb index 69e782318..6a5a55ce3 100644 --- a/test/functional/sessions_controller_test.rb +++ b/test/functional/sessions_controller_test.rb @@ -37,10 +37,7 @@ class SessionsControllerTest < Redmine::ControllerTest token = Token.create!(:user_id => 2, :action => 'session', :created_on => 10.hours.ago, :updated_on => 10.hours.ago) created = token.reload.created_on - get :index, :session => { - :user_id => 2, - :tk => token.value - } + get(:index, :session => {:user_id => 2, :tk => token.value}) assert_response :success token.reload assert_equal created.to_i, token.created_on.to_i @@ -53,18 +50,13 @@ class SessionsControllerTest < Redmine::ControllerTest token = Token.create!(:user_id => 2, :action => 'session', :created_on => created, :updated_on => created) with_settings :session_lifetime => '0', :session_timeout => '0' do - get :index, :session => { - :user_id => 2, - :tk => token.value - } + get(:index, :session => {:user_id => 2, :tk => token.value}) assert_response :success end end def test_user_session_without_token_should_be_reset - get :index, :session => { - :user_id => 2 - } + get(:index, :session => {:user_id => 2}) assert_redirected_to 'http://test.host/login?back_url=http%3A%2F%2Ftest.host%2F' end @@ -73,10 +65,13 @@ class SessionsControllerTest < Redmine::ControllerTest token = Token.create!(:user_id => 2, :action => 'session', :created_on => created, :updated_on => created) with_settings :session_timeout => '720' do - get :index, :session => { + get( + :index, + :session => { :user_id => 2, :tk => token.value } + ) assert_redirected_to 'http://test.host/login?back_url=http%3A%2F%2Ftest.host%2F' end end @@ -86,10 +81,13 @@ class SessionsControllerTest < Redmine::ControllerTest token = Token.create!(:user_id => 2, :action => 'session', :created_on => created, :updated_on => created) with_settings :session_timeout => '720' do - get :index, :session => { + get( + :index, + :session => { :user_id => 2, :tk => token.value } + ) assert_response :success end end @@ -99,10 +97,13 @@ class SessionsControllerTest < Redmine::ControllerTest token = Token.create!(:user_id => 2, :action => 'session', :created_on => created, :updated_on => created) with_settings :session_timeout => '60' do - get :index, :session => { + get( + :index, + :session => { :user_id => 2, :tk => token.value } + ) assert_redirected_to 'http://test.host/login?back_url=http%3A%2F%2Ftest.host%2F' end end @@ -112,10 +113,13 @@ class SessionsControllerTest < Redmine::ControllerTest token = Token.create!(:user_id => 2, :action => 'session', :created_on => created, :updated_on => created) with_settings :session_timeout => '60' do - get :index, :session => { + get( + :index, + :session => { :user_id => 2, :tk => token.value } + ) assert_response :success end end @@ -128,10 +132,13 @@ class SessionsControllerTest < Redmine::ControllerTest autologin_token = Token.create!(:user_id => 2, :action => 'autologin', :created_on => 1.day.ago) @request.cookies['autologin'] = autologin_token.value - get :index, :session => { + get( + :index, + :session => { :user_id => 2, :tk => token.value } + ) assert_equal 2, session[:user_id] assert_response :success assert_not_equal token.value, session[:tk] @@ -147,10 +154,13 @@ class SessionsControllerTest < Redmine::ControllerTest token = Token.create!(:user_id => 2, :action => 'session', :created_on => created, :updated_on => created) with_settings :session_timeout => '60' do - get :index, :session => { + get( + :index, + :session => { :user_id => user.id, :tk => token.value } + ) assert_redirected_to 'http://test.host/login?back_url=http%3A%2F%2Ftest.host%2F' assert_include "Veuillez vous reconnecter", flash[:error] assert_equal :fr, current_language |