mirror of
https://github.com/redmine/redmine.git
synced 2025-11-12 08:16:03 +01:00
Merged r15586 (#23172).
git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@15743 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -2292,6 +2292,19 @@ class IssueTest < ActiveSupport::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
def test_assignable_users_should_not_include_users_that_cannot_view_the_tracker
|
||||
user = User.find(3)
|
||||
role = Role.find(2)
|
||||
role.set_permission_trackers :view_issues, [1, 3]
|
||||
role.save!
|
||||
|
||||
issue1 = Issue.new(:project_id => 1, :tracker_id => 1)
|
||||
issue2 = Issue.new(:project_id => 1, :tracker_id => 2)
|
||||
|
||||
assert_include user, issue1.assignable_users
|
||||
assert_not_include user, issue2.assignable_users
|
||||
end
|
||||
|
||||
def test_create_should_send_email_notification
|
||||
ActionMailer::Base.deliveries.clear
|
||||
issue = Issue.new(:project_id => 1, :tracker_id => 1,
|
||||
|
||||
Reference in New Issue
Block a user