diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2024-11-29 07:58:59 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2024-11-29 07:58:59 +0000 |
commit | 018d89bf8ac3b0f6d9f545a0aeb8cc5c3bbec56e (patch) | |
tree | 9fb8a2c0b10a0e5c59901b7cdef20cb8ef5da7b6 /test/helpers/watchers_helper_test.rb | |
parent | d63678068a2e31dcd9930c0f96e07dc2dcb78b6b (diff) | |
download | redmine-018d89bf8ac3b0f6d9f545a0aeb8cc5c3bbec56e.tar.gz redmine-018d89bf8ac3b0f6d9f545a0aeb8cc5c3bbec56e.zip |
Fixes that group icons in Watchers box have both the old and the new icon style (#41853).
git-svn-id: https://svn.redmine.org/redmine/trunk@23328 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/helpers/watchers_helper_test.rb')
-rw-r--r-- | test/helpers/watchers_helper_test.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/helpers/watchers_helper_test.rb b/test/helpers/watchers_helper_test.rb index 1d29d33d5..f1f0ff8c0 100644 --- a/test/helpers/watchers_helper_test.rb +++ b/test/helpers/watchers_helper_test.rb @@ -94,4 +94,34 @@ class WatchersHelperTest < Redmine::HelperTest end end end + + def test_watchers_list_should_include_avatar_and_user_name + issue = Issue.find(1) + Watcher.create!(:watchable => issue, :user => User.find(1)) + + with_settings :gravatar_enabled => '1' do + result = watchers_list(issue) + assert_select_in result, 'ul.watchers' do + assert_select 'li', 1 + assert_select 'li:nth-of-type(1)>img.gravatar', 1 + assert_select 'li:nth-of-type(1)>a[href=?]', '/users/1', text: 'Redmine Admin' + assert_select 'li:nth-of-type(1)>a.group>svg.icon-svg', 0 + end + end + end + + def test_watchers_list_should_include_svg_icon_and_group_name + issue = Issue.find(1) + Watcher.create!(:watchable => issue, :user => Group.find(10)) + + with_settings :gravatar_enabled => '1' do + result = watchers_list(issue) + assert_select_in result, 'ul.watchers' do + assert_select 'li', 1 + assert_select 'li:nth-of-type(1)>a.group>svg.icon-svg', 1 + assert_select 'li:nth-of-type(1)>a[href=?]', '/groups/10', text: 'A Team' + assert_select 'li:nth-of-type(1)>img.gravatar', 0 + end + end + end end |