diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-12-04 21:30:34 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-12-04 21:30:34 +0900 |
commit | 8b505635a9f855d29ae75ab902641445bdb7ffd7 (patch) | |
tree | 453181ca6282a9f4e233004ec026cc6cd1df67dd | |
parent | b21dd995e5a1a419354232fc8f7a8f8b9eb665f8 (diff) | |
download | gitlab-ce-mr-pipelines-2-test.tar.gz |
Fix spec for thatmr-pipelines-2-test
-rw-r--r-- | spec/lib/gitlab/ci/pipeline/chain/validate/config_spec.rb | 12 | ||||
-rw-r--r-- | spec/services/ci/create_pipeline_service_spec.rb | 8 |
2 files changed, 3 insertions, 17 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/chain/validate/config_spec.rb b/spec/lib/gitlab/ci/pipeline/chain/validate/config_spec.rb index ac3d8991cbe..053bc421649 100644 --- a/spec/lib/gitlab/ci/pipeline/chain/validate/config_spec.rb +++ b/spec/lib/gitlab/ci/pipeline/chain/validate/config_spec.rb @@ -120,18 +120,6 @@ describe Gitlab::Ci::Pipeline::Chain::Validate::Config do let(:chain) { described_class.new(merge_request_pipeline, command).tap(&:perform!) } - context "when config does not contain 'merge_request' keyword" do - let(:config) { { rspec: { script: 'echo' } } } - - it 'breaks this chain and appends validation errors' do - expect(chain).to be_break - - expect(merge_request_pipeline.errors.to_a) - .to include 'Merge request pipelines cannot be created ' \ - 'unless .gitlab-ci.yml contains "only/except: merge_requests"' - end - end - context "when config contains 'merge_requests' keyword" do let(:config) { { rspec: { script: 'echo', only: ['merge_requests'] } } } diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb index 73767d90af6..7bc990f05c2 100644 --- a/spec/services/ci/create_pipeline_service_spec.rb +++ b/spec/services/ci/create_pipeline_service_spec.rb @@ -705,7 +705,7 @@ describe Ci::CreatePipelineService do expect(pipeline).to be_persisted expect(pipeline).to be_merge_request expect(pipeline.merge_request).to eq(merge_request) - expect(pipeline.builds.order(:stage_id).map(&:name)).to eq(%w[build test]) + expect(pipeline.builds.order(:stage_id).map(&:name)).to eq(%w[test]) end context 'when ref is tag' do @@ -795,8 +795,7 @@ describe Ci::CreatePipelineService do expect(pipeline).not_to be_persisted expect(pipeline.errors[:base]) - .to eq(["Merge request pipelines cannot be created " \ - "unless .gitlab-ci.yml contains \"only/except: merge_requests\""]) + .to eq(['No stages / jobs for this pipeline.']) end end @@ -807,8 +806,7 @@ describe Ci::CreatePipelineService do expect(pipeline).not_to be_persisted expect(pipeline.errors[:base]) - .to eq(["Merge request pipelines cannot be created " \ - "unless .gitlab-ci.yml contains \"only/except: merge_requests\""]) + .to eq(['No stages / jobs for this pipeline.']) end end end |