diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2022-02-24 21:54:30 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2022-02-24 21:54:30 +0000 |
commit | fbca88afc43df94d0f3dd9b0283df1769231b88a (patch) | |
tree | 445d01eed75810a0cce282bc8e1c239f2fe44f8a /test/helpers/application_helper_test.rb | |
parent | 8470b8b4787e63cdc00f9c66429a4f87028a0a75 (diff) | |
download | redmine-fbca88afc43df94d0f3dd9b0283df1769231b88a.tar.gz redmine-fbca88afc43df94d0f3dd9b0283df1769231b88a.zip |
Add class @user-mention@ to user classes when user is linked using @ (#36699, #13919).
git-svn-id: http://svn.redmine.org/redmine/trunk@21440 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/helpers/application_helper_test.rb')
-rw-r--r-- | test/helpers/application_helper_test.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index 99727b956..20b854cc7 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -562,12 +562,12 @@ class ApplicationHelperTest < Redmine::HelperTest 'user:jsmith' => link_to_user(User.find_by_id(2)), 'user:JSMITH' => link_to_user(User.find_by_id(2)), 'user#2' => link_to_user(User.find_by_id(2)), - '@jsmith' => link_to_user(User.find_by_id(2)), - '@jsmith.' => "#{link_to_user(User.find_by_id(2))}.", - '@JSMITH' => link_to_user(User.find_by_id(2)), - '@abcd@example.com' => link_to_user(User.find_by_id(u_email_id)), + '@jsmith' => link_to_user(User.find_by_id(2), class: 'user-mention'), + '@jsmith.' => "#{link_to_user(User.find_by_id(2), class: 'user-mention')}.", + '@JSMITH' => link_to_user(User.find_by_id(2), class: 'user-mention'), + '@abcd@example.com' => link_to_user(User.find_by_id(u_email_id), class: 'user-mention'), 'user:abcd@example.com' => link_to_user(User.find_by_id(u_email_id)), - '@foo.bar@example.com' => link_to_user(User.find_by_id(u_email_id_2)), + '@foo.bar@example.com' => link_to_user(User.find_by_id(u_email_id_2), class: 'user-mention'), 'user:foo.bar@example.com' => link_to_user(User.find_by_id(u_email_id_2)), # invalid user 'user:foobar' => 'user:foobar', @@ -596,7 +596,7 @@ class ApplicationHelperTest < Redmine::HelperTest # user link format: @jsmith@somenet.foo raw = "@jsmith@somenet.foo should not be parsed in jsmith@somenet.foo" assert_match( - %r{<p><a class="user active".*>#{u.name}</a> should not be parsed in #{html}</p>}, + %r{<p><a class="user active user-mention".*>#{u.name}</a> should not be parsed in #{html}</p>}, textilizable(raw, :project => Project.find(1)) ) # user link format: user:jsmith@somenet.foo @@ -616,7 +616,7 @@ class ApplicationHelperTest < Redmine::HelperTest # user link format: @jsmith@somenet.foo raw = "@jsmith@somenet.foo should not be parsed in jsmith@somenet.foo" assert_match( - %r{<p><a class=\"user active\".*>#{u.name}</a> should not be parsed in #{html}</p>}, + %r{<p><a class=\"user active user-mention\".*>#{u.name}</a> should not be parsed in #{html}</p>}, textilizable(raw, :project => Project.find(1)) ) # user link format: user:jsmith@somenet.foo |