From 461fe8304fad30042a6a42c0d451ee9651dc62c8 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 9 Dec 2020 14:12:46 +0000 Subject: [PATCH] use with_settings at MailHandlerControllerTest#test_new git-svn-id: http://svn.redmine.org/redmine/trunk@20599 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/mail_handler_controller_test.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/functional/mail_handler_controller_test.rb b/test/functional/mail_handler_controller_test.rb index 89da9c016..abf2f0182 100644 --- a/test/functional/mail_handler_controller_test.rb +++ b/test/functional/mail_handler_controller_test.rb @@ -162,9 +162,12 @@ class MailHandlerControllerTest < Redmine::ControllerTest end def test_new - Setting.mail_handler_api_enabled = 1 - Setting.mail_handler_api_key = 'secret' - get(:new, :params => {:key => 'secret'}) + with_settings( + :mail_handler_api_enabled => 1, + :mail_handler_api_key => 'secret' + ) do + get(:new, :params => {:key => 'secret'}) + end assert_response :success end end -- 2.39.5