Merged r3783 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3791 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
Return-Path: <john.doe@somenet.foo>
|
||||
Received: from osiris ([127.0.0.1])
|
||||
by OSIRIS
|
||||
with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
|
||||
Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
|
||||
To: <redmine@somenet.foo>
|
||||
Subject: Ticket by unknown user
|
||||
Date: Sun, 22 Jun 2008 12:28:07 +0200
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain;
|
||||
format=flowed;
|
||||
charset="iso-8859-1";
|
||||
reply-type=original
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
This is a ticket submitted by an unknown user.
|
||||
|
||||
@@ -166,6 +166,15 @@ class MailHandlerTest < ActiveSupport::TestCase
|
||||
assert issue.author.anonymous?
|
||||
end
|
||||
end
|
||||
|
||||
def test_add_issue_by_anonymous_user_with_no_from_address
|
||||
Role.anonymous.add_permission!(:add_issues)
|
||||
assert_no_difference 'User.count' do
|
||||
issue = submit_email('ticket_by_empty_user.eml', :issue => {:project => 'ecookbook'}, :unknown_user => 'accept')
|
||||
assert issue.is_a?(Issue)
|
||||
assert issue.author.anonymous?
|
||||
end
|
||||
end
|
||||
|
||||
def test_add_issue_by_anonymous_user_on_private_project
|
||||
Role.anonymous.add_permission!(:add_issues)
|
||||
|
||||
Reference in New Issue
Block a user