summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/issues_controller_test.rb3
-rw-r--r--test/functional/messages_controller_test.rb3
-rw-r--r--test/functional/wiki_controller_test.rb3
-rw-r--r--test/helpers/application_helper_test.rb17
4 files changed, 17 insertions, 9 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 3b7521d40..fbe512122 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -2827,7 +2827,8 @@ class IssuesControllerTest < Redmine::ControllerTest
assert_select 'a[class*=delete]'
end
assert_select "li.user-10" do
- assert_select 'img.gravatar[title=?]', 'A Team'
+ assert_select 'a.group', :text => 'A Team'
+ assert_select 'svg'
assert_select 'a[href="/groups/10"]'
assert_select 'a[class*=delete]'
end
diff --git a/test/functional/messages_controller_test.rb b/test/functional/messages_controller_test.rb
index c0723643b..494628b8c 100644
--- a/test/functional/messages_controller_test.rb
+++ b/test/functional/messages_controller_test.rb
@@ -106,7 +106,8 @@ class MessagesControllerTest < Redmine::ControllerTest
assert_select 'a[class*=delete]'
end
assert_select "li.user-10" do
- assert_select 'img.gravatar[title=?]', 'A Team', is_display_gravatar
+ assert_select 'a.group', :text => 'A Team'
+ assert_select 'svg'
assert_select 'a[href="/users/10"]', false
assert_select 'a[class*=delete]'
end
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb
index fdfaaf805..9d94f5c20 100644
--- a/test/functional/wiki_controller_test.rb
+++ b/test/functional/wiki_controller_test.rb
@@ -142,7 +142,8 @@ class WikiControllerTest < Redmine::ControllerTest
assert_select 'a[class*=delete]'
end
assert_select 'li.user-10' do
- assert_select 'img.gravatar[title=?]', 'A Team', is_display_gravatar
+ assert_select 'a.group', :text => 'A Team'
+ assert_select 'svg'
assert_select 'a[href="/users/10"]', false
assert_select 'a[class*=delete]'
end
diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb
index fabaa31ed..3d3861f66 100644
--- a/test/helpers/application_helper_test.rb
+++ b/test/helpers/application_helper_test.rb
@@ -2008,13 +2008,18 @@ class ApplicationHelperTest < Redmine::HelperTest
end
def test_principals_check_box_tag_with_avatar
- principals = [User.find(1), Group.find(10)]
+ user = User.find(1)
+ group = Group.find(10)
with_settings :gravatar_enabled => '1' do
- tags = principals_check_box_tags("watcher[user_ids][]", principals)
- principals.each do |principal|
- assert_include avatar(principal, :size => 16), tags
- assert_not_include content_tag('span', nil, :class => "name icon icon-#{principal.class.name.downcase}"), tags
- end
+ tags = principals_check_box_tags("watcher[user_ids][]", [user, group])
+
+ # User should have avatar
+ assert_include avatar(user, :size => 16), tags
+ assert_not_include content_tag('span', nil, :class => "name icon icon-#{user.class.name.downcase}"), tags
+
+ # Group should have group icon
+ assert_not_include avatar(group, :size => 16), tags
+ assert_include content_tag('span', principal_icon(group), :class => "name icon icon-#{group.class.name.downcase}"), tags
end
end