Patch #41889 ยป fix-random-text-failure-due-to-unsorted-mentioned_users.patch
| test/unit/lib/redmine/acts/mentionable_test.rb | ||
|---|---|---|
| 49 | 49 |
def test_mentioned_users_with_multiple_mentions |
| 50 | 50 |
issue = Issue.generate!(project_id: 1, description: 'Hello @dlopper, @jsmith.') |
| 51 | 51 | |
| 52 |
assert_equal [User.find(2), User.find(3)], issue.mentioned_users |
|
| 52 |
assert_equal [User.find(2), User.find(3)], issue.mentioned_users.sort_by(&:id)
|
|
| 53 | 53 |
end |
| 54 | 54 | |
| 55 | 55 |
def test_mentioned_users_should_not_mention_same_user_multiple_times |
| 56 | 56 |
issue = Issue.generate!(project_id: 1, description: '@dlopper @jsmith @dlopper') |
| 57 | 57 | |
| 58 |
assert_equal [User.find(2), User.find(3)], issue.mentioned_users |
|
| 58 |
assert_equal [User.find(2), User.find(3)], issue.mentioned_users.sort_by(&:id)
|
|
| 59 | 59 |
end |
| 60 | 60 | |
| 61 | 61 |
def test_mentioned_users_should_include_only_active_users |
| ... | ... | |
| 137 | 137 |
def test_notified_mentions |
| 138 | 138 |
issue = Issue.generate!(project_id: 1, description: 'Hello @dlopper, @jsmith.') |
| 139 | 139 | |
| 140 |
assert_equal [User.find(2), User.find(3)], issue.notified_mentions |
|
| 140 |
assert_equal [User.find(2), User.find(3)], issue.notified_mentions.sort_by(&:id)
|
|
| 141 | 141 |
end |
| 142 | 142 | |
| 143 | 143 |
def test_notified_mentions_should_not_include_users_who_out_of_all_email |