@@ -367,7 +367,7 class Issue < ActiveRecord::Base | |||||
367 | def assignable_users |
|
367 | def assignable_users | |
368 | users = project.assignable_users |
|
368 | users = project.assignable_users | |
369 | users << author if author |
|
369 | users << author if author | |
370 | users.sort |
|
370 | users.uniq.sort | |
371 | end |
|
371 | end | |
372 |
|
372 | |||
373 | # Versions that the issue can be assigned to |
|
373 | # Versions that the issue can be assigned to |
@@ -523,6 +523,15 class IssueTest < ActiveSupport::TestCase | |||||
523 |
|
523 | |||
524 | assert issue.assignable_users.include?(non_project_member) |
|
524 | assert issue.assignable_users.include?(non_project_member) | |
525 | end |
|
525 | end | |
|
526 | ||||
|
527 | should "not show the issue author twice" do | |||
|
528 | assignable_user_ids = Issue.find(1).assignable_users.collect(&:id) | |||
|
529 | assert_equal 2, assignable_user_ids.length | |||
|
530 | ||||
|
531 | assignable_user_ids.each do |user_id| | |||
|
532 | assert_equal 1, assignable_user_ids.count(user_id), "User #{user_id} appears more or less than once" | |||
|
533 | end | |||
|
534 | end | |||
526 | end |
|
535 | end | |
527 |
|
536 | |||
528 | def test_create_should_send_email_notification |
|
537 | def test_create_should_send_email_notification |
General Comments 0
You need to be logged in to leave comments.
Login now