Commit e9048ecc authored by Etienne Baqué's avatar Etienne Baqué

Merge branch '15332-add-draft-status-change-email' into 'master'

Add mail templates for changes in MR draft status

See merge request gitlab-org/gitlab!54870
parents f2d556a3 e2a057ea
%p
= _('%{username} changed the draft status of merge request %{mr_reference}' % {username: sanitize_name(@updated_by_user.name), mr_reference: @merge_request.to_reference })
<%= "#{sanitize_name(@updated_by_user.name)} changed the draft status of merge request #{@merge_request.to_reference}" %>
---
title: Add notification templates for merge request draft/WIP status change events
merge_request: 54870
author:
type: other
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'notify/change_in_merge_request_draft_status_email.html.haml' do
let(:user) { create(:user) }
let(:merge_request) { create(:merge_request) }
before do
assign(:updated_by_user, user)
assign(:merge_request, merge_request)
end
it 'renders the email correctly' do
render
expect(rendered).to have_content("#{user.name} changed the draft status of merge request #{merge_request.to_reference}")
end
end
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'notify/change_in_merge_request_draft_status_email.text.erb' do
let(:user) { create(:user) }
let(:merge_request) { create(:merge_request) }
before do
assign(:updated_by_user, user)
assign(:merge_request, merge_request)
end
it_behaves_like 'renders plain text email correctly'
it 'renders the email correctly' do
render
expect(rendered).to have_content("#{user.name} changed the draft status of merge request #{merge_request.to_reference}")
end
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