summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2022-06-17 10:25:15 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2022-06-17 10:25:15 +0000
commit7c8df4c29dc0cfcc90175563e74ac96c6c2794df (patch)
tree0e4bfabf91d1246b1d91f971ed2086397f5654b7 /test
parentfd8d8ba18cf297aa9d51e87f4bad21605a393a2e (diff)
downloadredmine-7c8df4c29dc0cfcc90175563e74ac96c6c2794df.tar.gz
redmine-7c8df4c29dc0cfcc90175563e74ac96c6c2794df.zip
Merged r21641 to 5.0-stable (#37187).
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@21652 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/mail_handler_test.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb
index 9d0dad1a7..b36259c14 100644
--- a/test/unit/mail_handler_test.rb
+++ b/test/unit/mail_handler_test.rb
@@ -403,6 +403,35 @@ class MailHandlerTest < ActiveSupport::TestCase
end
end
+ def test_no_issue_on_closed_project_without_permission_check
+ Project.find(2).close
+ assert_no_difference 'User.count' do
+ assert_no_difference 'Issue.count' do
+ submit_email(
+ 'ticket_by_unknown_user.eml',
+ :issue => {:project => 'onlinestore'},
+ :no_permission_check => '1',
+ :unknown_user => 'accept'
+ )
+ end
+ end
+ ensure
+ Project.find(2).reopen
+ end
+
+ def test_no_issue_on_closed_project_without_issue_tracking_module
+ assert_no_difference 'User.count' do
+ assert_no_difference 'Issue.count' do
+ submit_email(
+ 'ticket_by_unknown_user.eml',
+ :issue => {:project => 'subproject2'},
+ :no_permission_check => '1',
+ :unknown_user => 'accept'
+ )
+ end
+ end
+ end
+
def test_add_issue_by_created_user
Setting.default_language = 'en'
assert_difference 'User.count' do