mirror of
https://github.com/redmine/redmine.git
synced 2025-11-13 00:36:01 +01:00
Adds Initials to the list of default gratavar options (#42623).
git-svn-id: https://svn.redmine.org/redmine/trunk@23767 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -68,6 +68,18 @@ class AvatarsHelperTest < Redmine::HelperTest
|
||||
assert_include 'class="gravatar picture"', avatar('jsmith <jsmith@somenet.foo>', :class => 'picture')
|
||||
end
|
||||
|
||||
def test_avatar_with_initials
|
||||
with_settings :gravatar_default => 'initials' do
|
||||
assert_include 'initials="RA"', avatar(User.find(1))
|
||||
end
|
||||
end
|
||||
|
||||
def test_avatar_should_reject_initials_if_default_is_not_initials
|
||||
with_settings :gravatar_default => 'identicon' do
|
||||
assert_not_include 'initials="RA"', avatar(User.find(1))
|
||||
end
|
||||
end
|
||||
|
||||
def test_avatar_disabled
|
||||
with_settings :gravatar_enabled => '0' do
|
||||
assert_equal '', avatar(User.find_by_mail('jsmith@somenet.foo'))
|
||||
|
||||
Reference in New Issue
Block a user