diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-19 17:16:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-19 17:16:28 +0300 |
commit | e4384360a16dd9a19d4d2d25d0ef1f2b862ed2a6 (patch) | |
tree | 2fcdfa7dcdb9db8f5208b2562f4b4e803d671243 /spec/views/notify/pipeline_fixed_email.html.haml_spec.rb | |
parent | ffda4e7bcac36987f936b4ba515995a6698698f0 (diff) |
Add latest changes from gitlab-org/gitlab@16-2-stable-eev16.2.0-rc42
Diffstat (limited to 'spec/views/notify/pipeline_fixed_email.html.haml_spec.rb')
-rw-r--r-- | spec/views/notify/pipeline_fixed_email.html.haml_spec.rb | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/spec/views/notify/pipeline_fixed_email.html.haml_spec.rb b/spec/views/notify/pipeline_fixed_email.html.haml_spec.rb index bdfc8fb5f6b..4c26de4650e 100644 --- a/spec/views/notify/pipeline_fixed_email.html.haml_spec.rb +++ b/spec/views/notify/pipeline_fixed_email.html.haml_spec.rb @@ -2,9 +2,22 @@ require 'spec_helper' -RSpec.describe 'notify/pipeline_fixed_email.html.haml' do - it_behaves_like 'pipeline status changes email' do +RSpec.describe 'notify/pipeline_fixed_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 has been fixed and #{pipeline.name} has passed!" } + let(:status) { :success } + + it_behaves_like 'pipeline status changes email' + end + + context 'when pipeline does not have a name attribute' do let(:title) { "Pipeline has been fixed and ##{pipeline.id} has passed!" } let(:status) { :success } + + it_behaves_like 'pipeline status changes email' end end |