mirror of
https://github.com/redmine/redmine.git
synced 2026-05-06 15:47:01 +02:00
Fix mentions of users with "@" in their username not working (#37138).
git-svn-id: https://svn.redmine.org/redmine/trunk@21660 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -34,6 +34,15 @@ class Redmine::Acts::MentionableTest < ActiveSupport::TestCase
|
||||
assert_equal [User.find(3)], issue.mentioned_users
|
||||
end
|
||||
|
||||
def test_mentioned_users_with_user_mention_having_mail_as_login
|
||||
user = User.generate!(login: "foo@example.net")
|
||||
User.add_to_project(user, Project.find(1), Role.find(1))
|
||||
|
||||
issue = Issue.generate!(project_id: 1, description: '@dlopper and @foo@example.net')
|
||||
|
||||
assert_equal [User.find(3), user], issue.mentioned_users
|
||||
end
|
||||
|
||||
def test_mentioned_users_with_multiple_mentions
|
||||
issue = Issue.generate!(project_id: 1, description: 'Hello @dlopper, @jsmith.')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user