Commit a739cfe6 authored by Mike Greiling's avatar Mike Greiling

Merge branch 'tc-fix-plain-text-commit-mails' into 'master'

Remove HTML link from plain text mail

See merge request gitlab-org/gitlab!36301
parents 60430e8d 55c948a1
#{sanitize_name(@updated_by_user.name)} pushed new commits to merge request #{merge_request_reference_link(@merge_request)} #{sanitize_name(@updated_by_user.name)} pushed new commits to merge request #{@merge_request.to_reference}
Merge Request URL: #{project_merge_request_url(@merge_request.target_project, @merge_request)}
\ \
- if @existing_commits.any? - if @existing_commits.any?
- count = @existing_commits.size - count = @existing_commits.size
......
---
title: Remove HTML link from plain text mail
merge_request: 36301
author:
type: fixed
# frozen_string_literal: true
RSpec.shared_examples 'renders plain text email correctly' do
it 'renders the email without HTML links' do
render
expect(rendered).to have_no_selector('a')
end
end
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'notify/push_to_merge_request_email.text.haml' do
let(:user) { create(:user, developer_projects: [project]) }
let(:project) { create(:project, :repository) }
let(:merge_request) { create(:merge_request, :simple, source_project: project) }
let(:new_commits) { project.repository.commits_between('be93687618e4b132087f430a4d8fc3a609c9b77c', '54fcc214b94e78d7a41a9a8fe6d87a5e59500e51') }
before do
assign(:updated_by_user, user)
assign(:project, project)
assign(:merge_request, merge_request)
assign(:existing_commits, [])
assign(:new_commits, new_commits)
end
it_behaves_like 'renders plain text email correctly'
end
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