From f317b818d64ca05b74bd2836ad3d1c00f666a4a5 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 13 Nov 2020 12:39:46 +0000 Subject: 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 --- test/integration/sudo_mode_test.rb | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) (limited to 'test') 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 -- cgit v1.2.3