mirror of
https://github.com/redmine/redmine.git
synced 2025-11-11 15:56:03 +01:00
use with_settings at MailHandlerControllerTest#test_should_respond_with_422_if_not_created
git-svn-id: http://svn.redmine.org/redmine/trunk@20546 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -102,17 +102,20 @@ class MailHandlerControllerTest < Redmine::ControllerTest
|
|||||||
|
|
||||||
def test_should_respond_with_422_if_not_created
|
def test_should_respond_with_422_if_not_created
|
||||||
Project.find('onlinestore').destroy
|
Project.find('onlinestore').destroy
|
||||||
|
with_settings(
|
||||||
Setting.mail_handler_api_enabled = 1
|
:mail_handler_api_enabled => 1,
|
||||||
Setting.mail_handler_api_key = 'secret'
|
:mail_handler_api_key => 'secret'
|
||||||
assert_no_difference 'Issue.count' do
|
) do
|
||||||
post(
|
assert_no_difference 'Issue.count' do
|
||||||
:index,
|
post(
|
||||||
:params => {
|
:index,
|
||||||
:key => 'secret',
|
:params => {
|
||||||
:email => IO.read(File.join(FIXTURES_PATH, 'ticket_on_given_project.eml'))
|
:key => 'secret',
|
||||||
}
|
:email =>
|
||||||
)
|
IO.read(File.join(FIXTURES_PATH, 'ticket_on_given_project.eml'))
|
||||||
|
}
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
assert_response 422
|
assert_response 422
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user