summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRydkin Maxim <maks.rydkin@gmail.com>2017-03-20 23:52:35 +0300
committerRydkin Maxim <maks.rydkin@gmail.com>2017-04-04 21:11:25 +0300
commitd2f2168b51284bee445e10d7ad399175ed51c539 (patch)
treeb856c77359c32f5bd48da82d1cef40ca9c351476
parent29db8ab982bc912c2404cf35527362b5f991e1ce (diff)
downloadgitlab-ce-d2f2168b51284bee445e10d7ad399175ed51c539.tar.gz
remove `a pending pipeline` shared example
-rw-r--r--spec/services/ci/create_pipeline_service_spec.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb
index b89ed7dcf44..c287fe42ab2 100644
--- a/spec/services/ci/create_pipeline_service_spec.rb
+++ b/spec/services/ci/create_pipeline_service_spec.rb
@@ -18,19 +18,15 @@ describe Ci::CreatePipelineService, services: true do
described_class.new(project, user, params).execute
end
- shared_examples 'a pending pipeline' do
+ context 'valid params' do
+ let(:pipeline) { execute_service }
+
it { expect(pipeline).to be_kind_of(Ci::Pipeline) }
it { expect(pipeline).to be_valid }
it { expect(pipeline).to eq(project.pipelines.last) }
it { expect(pipeline).to have_attributes(user: user) }
it { expect(pipeline).to have_attributes(status: 'pending') }
it { expect(pipeline.builds.first).to be_kind_of(Ci::Build) }
- end
-
- context 'valid params' do
- let(:pipeline) { execute_service }
-
- it_behaves_like 'a pending pipeline'
context 'auto-cancel enabled' do
let(:pipeline_on_previous_commit) do