summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/ci/pipeline/chain/create_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/ci/pipeline/chain/create_spec.rb')
-rw-r--r--spec/lib/gitlab/ci/pipeline/chain/create_spec.rb32
1 files changed, 15 insertions, 17 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/chain/create_spec.rb b/spec/lib/gitlab/ci/pipeline/chain/create_spec.rb
index de69a65aee4..0edc3f315bb 100644
--- a/spec/lib/gitlab/ci/pipeline/chain/create_spec.rb
+++ b/spec/lib/gitlab/ci/pipeline/chain/create_spec.rb
@@ -37,23 +37,21 @@ describe Gitlab::Ci::Pipeline::Chain::Create do
end
context 'when pipeline has validation errors' do
- context 'when ref is nil' do
- let(:pipeline) do
- build(:ci_pipeline, project: project, ref: nil)
- end
-
- before do
- step.perform!
- end
-
- it 'breaks the chain' do
- expect(step.break?).to be true
- end
-
- it 'appends validation error' do
- expect(pipeline.errors.to_a)
- .to include /Failed to persist the pipeline/
- end
+ let(:pipeline) do
+ build(:ci_pipeline, project: project, ref: nil)
+ end
+
+ before do
+ step.perform!
+ end
+
+ it 'breaks the chain' do
+ expect(step.break?).to be true
+ end
+
+ it 'appends validation error' do
+ expect(pipeline.errors.to_a)
+ .to include /Failed to persist the pipeline/
end
end
end