##// END OF EJS Templates
Don't duplicate users in Issue#assignable_users. From r4240...
Eric Davis -
r4127:73f12765a99b
parent child
Show More
@@ -392,7 +392,7 class Issue < ActiveRecord::Base
392 392 def assignable_users
393 393 users = project.assignable_users
394 394 users << author if author
395 users.sort
395 users.uniq.sort
396 396 end
397 397
398 398 # Versions that the issue can be assigned to
@@ -545,6 +545,15 class IssueTest < ActiveSupport::TestCase
545 545
546 546 assert issue.assignable_users.include?(non_project_member)
547 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 557 end
549 558
550 559 def test_create_should_send_email_notification
General Comments 0
You need to be logged in to leave comments. Login now