Defect #25867 » issue_test.rb.patch
issue_test.rb (working copy) | ||
---|---|---|
2309 | 2309 |
assert_kind_of User, Issue.find(1).assignable_users.first |
2310 | 2310 |
end |
2311 | 2311 | |
2312 |
test "#assignable_users should be sorted" do |
|
2313 |
%w(a č u ř c í ý š З д ч и).each do |firstname| |
|
2314 |
Member.create!(:project_id => 1, :principal => User.generate!(:firstname => firstname), :role_ids => [1]) |
|
2315 |
end |
|
2316 |
issue = Issue.new(:project => Project.find(1)) |
|
2317 |
assignable_users = Issue.find(1).assignable_users |
|
2318 |
assert_equal User.where(:id => assignable_users).sorted.pluck(:firstname), assignable_users.map(&:firstname) |
|
2319 |
end |
|
2320 | ||
2312 | 2321 |
test "#assignable_users should include the issue author" do |
2313 | 2322 |
non_project_member = User.generate! |
2314 | 2323 |
issue = Issue.generate!(:author => non_project_member) |