Actualiza a Redmine 3.4.13

This commit is contained in:
Manuel Cillero 2020-07-03 21:39:03 +02:00
parent 807ff3308d
commit ecddcaf1d3
224 changed files with 2222 additions and 1000 deletions

View file

@ -1328,7 +1328,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'))
@ -1340,10 +1339,13 @@ 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