blob: 1623c3757549b55a1cfd4ff30a84ccd36c54dcf9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'notify/pipeline_failed_email.html.haml', feature_category: :continuous_integration do
context 'when pipeline has a name attribute' do
before do
build_stubbed(:ci_pipeline_metadata, pipeline: pipeline, name: "My Pipeline")
end
let(:title) { "Pipeline #{pipeline.name} has failed!" }
let(:status) { :failed }
it_behaves_like 'pipeline status changes email'
end
context 'when pipeline does not have a name attribute' do
let(:title) { "Pipeline ##{pipeline.id} has failed!" }
let(:status) { :failed }
it_behaves_like 'pipeline status changes email'
end
end
|