summaryrefslogtreecommitdiffstats
path: root/test/functional/my_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/my_controller_test.rb')
-rw-r--r--test/functional/my_controller_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb
index 65190e611..c2eee6e73 100644
--- a/test/functional/my_controller_test.rb
+++ b/test/functional/my_controller_test.rb
@@ -23,6 +23,7 @@ class MyControllerTest < ActionController::TestCase
def setup
@request.session[:user_id] = 2
+ Redmine::SudoMode.disable!
end
def test_index
@@ -253,6 +254,12 @@ class MyControllerTest < ActionController::TestCase
assert_redirected_to '/my/account'
end
+ def test_show_api_key
+ get :show_api_key
+ assert_response :success
+ assert_select 'pre', User.find(2).api_key
+ end
+
def test_reset_api_key_with_existing_key
@previous_token_value = User.find(2).api_key # Will generate one if it's missing
post :reset_api_key