Commit 19b0e894 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents f5db1d53 2bd2fc20
# frozen_string_literal: true
module Ci
class BridgePresenter < CommitStatusPresenter
def detailed_status
@detailed_status ||= subject.detailed_status(user)
end
end
end
---
title: Fix notfication emails having wrong encoding
merge_request: 26931
author:
type: fixed
......@@ -4,5 +4,6 @@ Premailer::Rails.config.merge!(
preserve_styles: true,
remove_comments: true,
remove_ids: false,
remove_scripts: false
remove_scripts: false,
output_encoding: 'US-ASCII'
)
......@@ -30,6 +30,19 @@ describe Notify do
description: 'My awesome description!')
end
describe 'with HTML-encoded entities' do
before do
described_class.test_email('test@test.com', 'Subject', 'Some body with &mdash;').deliver
end
subject { ActionMailer::Base.deliveries.last }
it 'retains 7bit encoding' do
expect(subject.body.ascii_only?).to eq(true)
expect(subject.body.encoding).to eq('7bit')
end
end
context 'for a project' do
shared_examples 'an assignee email' do
it 'is sent to the assignee as the author' do
......
require 'spec_helper'
describe Ci::BridgePresenter do
set(:project) { create(:project) }
set(:pipeline) { create(:ci_pipeline, project: project) }
set(:bridge) { create(:ci_bridge, pipeline: pipeline, status: :failed) }
subject(:presenter) do
described_class.new(bridge)
end
it 'presents information about recoverable state' do
expect(presenter).to be_recoverable
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