@@ -392,7 +392,7 class Issue < ActiveRecord::Base | |||||
392 | def assignable_users |
|
392 | def assignable_users | |
393 | users = project.assignable_users |
|
393 | users = project.assignable_users | |
394 | users << author if author |
|
394 | users << author if author | |
395 | users.sort |
|
395 | users.uniq.sort | |
396 | end |
|
396 | end | |
397 |
|
397 | |||
398 | # Versions that the issue can be assigned to |
|
398 | # Versions that the issue can be assigned to |
@@ -545,6 +545,15 class IssueTest < ActiveSupport::TestCase | |||||
545 |
|
545 | |||
546 | assert issue.assignable_users.include?(non_project_member) |
|
546 | assert issue.assignable_users.include?(non_project_member) | |
547 | end |
|
547 | end | |
|
548 | ||||
|
549 | should "not show the issue author twice" do | |||
|
550 | assignable_user_ids = Issue.find(1).assignable_users.collect(&:id) | |||
|
551 | assert_equal 2, assignable_user_ids.length | |||
|
552 | ||||
|
553 | assignable_user_ids.each do |user_id| | |||
|
554 | assert_equal 1, assignable_user_ids.count(user_id), "User #{user_id} appears more or less than once" | |||
|
555 | end | |||
|
556 | end | |||
548 | end |
|
557 | end | |
549 |
|
558 | |||
550 | def test_create_should_send_email_notification |
|
559 | def test_create_should_send_email_notification |
General Comments 0
You need to be logged in to leave comments.
Login now