Commit b2d7201a authored by Sean McGivern's avatar Sean McGivern

Merge branch 'fix-mirror-status-error-message' into 'master'

Fix HTML being rendered in mirror error message

See merge request gitlab-org/gitlab!24651
parents d4141f69 50510ade
......@@ -8,7 +8,7 @@ module EE
return message if raw_message
message.insert(0, "#{icon('warning triangle')} ")
message = icon('warning triangle') + ' ' + message
if can?(current_user, :admin_project, @project)
link_to message, project_mirror_path(@project)
......
......@@ -42,6 +42,13 @@ describe 'shared/_mirror_status.html.haml' do
expect(rendered).to have_content("The repository failed to update")
end
it 'renders failure message with icon' do
render 'shared/mirror_status'
expect(rendered).to have_content('The repository failed to update')
expect(rendered).to have_css('i', class: 'fa-warning fa-triangle')
end
context 'with a previous successful update' do
it 'renders failure message' do
@project.import_state.last_successful_update_at = Time.now - 1.minute
......
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