Make default_avatar return a full path.
Callers expect a URL. This fixes the avatars in commit lists when a user has no avatar and Gravatar is disabled. Closes #38715
This commit is contained in:
parent
dc325c672e
commit
94039bd7ca
|
@ -89,7 +89,7 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def default_avatar
|
||||
'no_avatar.png'
|
||||
asset_path('no_avatar.png')
|
||||
end
|
||||
|
||||
def last_commit(project)
|
||||
|
|
|
@ -100,7 +100,7 @@ describe ApplicationHelper do
|
|||
end
|
||||
|
||||
it 'returns a generic avatar' do
|
||||
expect(helper.gravatar_icon(user_email)).to match('no_avatar.png')
|
||||
expect(helper.gravatar_icon(user_email)).to match_asset_path('no_avatar.png')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -110,7 +110,7 @@ describe ApplicationHelper do
|
|||
end
|
||||
|
||||
it 'returns a generic avatar when email is blank' do
|
||||
expect(helper.gravatar_icon('')).to match('no_avatar.png')
|
||||
expect(helper.gravatar_icon('')).to match_asset_path('no_avatar.png')
|
||||
end
|
||||
|
||||
it 'returns a valid Gravatar URL' do
|
||||
|
|
Loading…
Reference in New Issue