summaryrefslogtreecommitdiffstats
path: root/test/integration/sudo_mode_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/sudo_mode_test.rb')
-rw-r--r--test/integration/sudo_mode_test.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/integration/sudo_mode_test.rb b/test/integration/sudo_mode_test.rb
index 228e527ed..0c7de64e0 100644
--- a/test/integration/sudo_mode_test.rb
+++ b/test/integration/sudo_mode_test.rb
@@ -190,7 +190,7 @@ class SudoModeTest < Redmine::IntegrationTest
expire_sudo_mode!
get '/my/account'
assert_response :success
- put('/my/account', :params => {:user => {:mail => 'newmail@test.com'}})
+ post('/my/account', :params => {:_method => 'put', :user => {:mail => 'newmail@test.com'}})
assert_response :success
assert_select 'h2', 'Confirm your password to continue'
assert_select 'form[action="/my/account"]'
@@ -259,6 +259,14 @@ class SudoModeTest < Redmine::IntegrationTest
end
end
+ def test_sudo_mode_should_include_cache_control_no_store
+ log_user("admin", "admin")
+ expire_sudo_mode!
+ get '/settings'
+ assert_response :success
+ assert_includes @response.headers['Cache-Control'], 'no-store'
+ end
+
private
# sudo mode is active after sign, let it expire by advancing the time