diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-11-13 12:39:46 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-11-13 12:39:46 +0000 |
commit | f317b818d64ca05b74bd2836ad3d1c00f666a4a5 (patch) | |
tree | 5273024f5373d1f405c5c3556248c01f97288399 /test | |
parent | 00300e8fdaca07684b107a7ff1134dc17b817b69 (diff) | |
download | redmine-f317b818d64ca05b74bd2836ad3d1c00f666a4a5.tar.gz redmine-f317b818d64ca05b74bd2836ad3d1c00f666a4a5.zip |
shorten long line of test/integration/sudo_mode_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20353 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/integration/sudo_mode_test.rb | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/test/integration/sudo_mode_test.rb b/test/integration/sudo_mode_test.rb index 2b1912930..500f2b824 100644 --- a/test/integration/sudo_mode_test.rb +++ b/test/integration/sudo_mode_test.rb @@ -154,7 +154,18 @@ class SudoModeTest < Redmine::IntegrationTest assert_select '#flash_error' assert_difference 'Role.count' do - post '/roles', :params => {role: { name: 'new role', issues_visibility: 'all', assignable: '1', permissions: %w(view_calendar) }, sudo_password: 'admin'} + post( + '/roles', + :params => { + :role => { + :name => 'new role', + :issues_visibility => 'all', + :assignable => '1', + :permissions => %w(view_calendar) + }, + :sudo_password => 'admin' + } + ) end assert_redirected_to '/roles' end @@ -172,7 +183,15 @@ class SudoModeTest < Redmine::IntegrationTest assert_select '#flash_error', 0 # wrong password - put '/my/account', :params => {user: { mail: 'newmail@test.com' }, sudo_password: 'wrong'} + put( + '/my/account', + :params => { + :user => { + :mail => 'newmail@test.com' + }, + :sudo_password => 'wrong' + } + ) assert_response :success assert_select 'h2', 'Confirm your password to continue' assert_select 'form[action="/my/account"]' @@ -180,7 +199,15 @@ class SudoModeTest < Redmine::IntegrationTest assert_select '#flash_error' # correct password - put '/my/account', :params => {user: { mail: 'newmail@test.com' }, sudo_password: 'jsmith'} + put( + '/my/account', + :params => { + :user => { + :mail => 'newmail@test.com' + }, + :sudo_password => 'jsmith' + } + ) assert_redirected_to '/my/account' assert_equal 'newmail@test.com', User.find_by_login('jsmith').mail |