diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-04-07 07:25:27 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-04-07 07:25:27 +0000 |
commit | 9e05f69fdec53bbea0dce0877a9a7b2a3184137b (patch) | |
tree | bed9166b34e55b6cc8cf166c9848febf64eb2739 /test/helpers | |
parent | 73fecd7e59a7b394b8d5dcc4aba2fc4256683712 (diff) | |
download | redmine-9e05f69fdec53bbea0dce0877a9a7b2a3184137b.tar.gz redmine-9e05f69fdec53bbea0dce0877a9a7b2a3184137b.zip |
Anonymous icon is wrongly displayed when assignee is a group (#28208).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@17263 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/helpers')
-rw-r--r-- | test/helpers/application_helper_test.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index 81b3f7859..d8e468741 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -1287,7 +1287,6 @@ RAW end def test_avatar_enabled - tag_for_anonymous_re = %r{src="/images/anonymous.png(\?\d+)?"} with_settings :gravatar_enabled => '1' do assert avatar(User.find_by_mail('jsmith@somenet.foo')).include?(Digest::MD5.hexdigest('jsmith@somenet.foo')) assert avatar('jsmith <jsmith@somenet.foo>').include?(Digest::MD5.hexdigest('jsmith@somenet.foo')) @@ -1299,10 +1298,12 @@ RAW # The default class of the img tag should be gravatar assert avatar('jsmith <jsmith@somenet.foo>').include?('class="gravatar"') assert !avatar('jsmith <jsmith@somenet.foo>', :class => 'picture').include?('class="gravatar"') - assert_match tag_for_anonymous_re, avatar('jsmith') - assert_match tag_for_anonymous_re, avatar(nil) + assert_nil avatar('jsmith') + assert_nil avatar(nil) # Avatar for anonymous user - assert_match tag_for_anonymous_re, avatar(User.anonymous) + assert_match %r{src="/images/anonymous.png(\?\d+)?"}, avatar(User.anonymous) + # No avatar for groups + assert_nil avatar(Group.first) assert avatar(User.anonymous, :size => 24).include?('width="24" height="24"') end end |