Commit 94039bd7 authored by Felix Geyer's avatar Felix Geyer

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
...@@ -89,7 +89,7 @@ module ApplicationHelper ...@@ -89,7 +89,7 @@ module ApplicationHelper
end end
def default_avatar def default_avatar
'no_avatar.png' asset_path('no_avatar.png')
end end
def last_commit(project) def last_commit(project)
......
...@@ -100,7 +100,7 @@ describe ApplicationHelper do ...@@ -100,7 +100,7 @@ describe ApplicationHelper do
end end
it 'returns a generic avatar' do 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
end end
...@@ -110,7 +110,7 @@ describe ApplicationHelper do ...@@ -110,7 +110,7 @@ describe ApplicationHelper do
end end
it 'returns a generic avatar when email is blank' do 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 end
it 'returns a valid Gravatar URL' do it 'returns a valid Gravatar URL' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment