Skip to content
Snippets Groups Projects
Commit 94039bd7 authored by Felix Geyer's avatar Felix Geyer
Browse files

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
parent dc325c67
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -89,7 +89,7 @@ module ApplicationHelper
end
 
def default_avatar
'no_avatar.png'
asset_path('no_avatar.png')
end
 
def last_commit(project)
Loading
Loading
Loading
Loading
@@ -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
 
Loading
Loading
@@ -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
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment