mirror of
https://github.com/meineerde/redmine.git
synced 2025-10-17 17:01:01 +00:00
Merged r4240 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4315 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
c18d96bd8b
commit
e29696ea37
@ -365,7 +365,9 @@ class Issue < ActiveRecord::Base
|
||||
|
||||
# Users the issue can be assigned to
|
||||
def assignable_users
|
||||
project.assignable_users
|
||||
users = project.assignable_users
|
||||
users << author if author
|
||||
users.sort
|
||||
end
|
||||
|
||||
# Versions that the issue can be assigned to
|
||||
|
||||
@ -510,9 +510,19 @@ class IssueTest < ActiveSupport::TestCase
|
||||
assert !Issue.new(:due_date => nil).overdue?
|
||||
assert !Issue.new(:due_date => 1.day.ago.to_date, :status => IssueStatus.find(:first, :conditions => {:is_closed => true})).overdue?
|
||||
end
|
||||
|
||||
def test_assignable_users
|
||||
assert_kind_of User, Issue.find(1).assignable_users.first
|
||||
|
||||
context "#assignable_users" do
|
||||
should "be Users" do
|
||||
assert_kind_of User, Issue.find(1).assignable_users.first
|
||||
end
|
||||
|
||||
should "include the issue author" do
|
||||
project = Project.find(1)
|
||||
non_project_member = User.generate!
|
||||
issue = Issue.generate_for_project!(project, :author => non_project_member)
|
||||
|
||||
assert issue.assignable_users.include?(non_project_member)
|
||||
end
|
||||
end
|
||||
|
||||
def test_create_should_send_email_notification
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user