mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-24 09:21:12 +00:00
add test that anonymous user can add watchers by mail (#26654)
git-svn-id: http://svn.redmine.org/redmine/trunk@16963 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
6455e0431f
commit
abe914fd3f
@ -5,6 +5,7 @@ Received: from osiris ([127.0.0.1])
|
||||
Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
|
||||
From: "John Doe" <john.doe@somenet.foo>
|
||||
To: <redmine@somenet.foo>
|
||||
Cc: <dlopper@somenet.foo>
|
||||
Subject: Ticket by unknown user
|
||||
Date: Sun, 22 Jun 2008 12:28:07 +0200
|
||||
MIME-Version: 1.0
|
||||
|
||||
@ -318,6 +318,7 @@ class MailHandlerTest < ActiveSupport::TestCase
|
||||
|
||||
def test_add_issue_by_anonymous_user
|
||||
Role.anonymous.add_permission!(:add_issues)
|
||||
Role.anonymous.add_permission!(:add_issue_watchers)
|
||||
assert_no_difference 'User.count' do
|
||||
issue = submit_email(
|
||||
'ticket_by_unknown_user.eml',
|
||||
@ -326,6 +327,9 @@ class MailHandlerTest < ActiveSupport::TestCase
|
||||
)
|
||||
assert issue.is_a?(Issue)
|
||||
assert issue.author.anonymous?
|
||||
issue.reload
|
||||
assert issue.watched_by?(User.find_by_mail('dlopper@somenet.foo'))
|
||||
assert_equal 1, issue.watchers.size
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user