Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-06-02 10:19:34 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-06-02 10:19:34 +0300
commit3731ae092cac523a0092c64000d9e838662a85df (patch)
treed8449d24ff6da3bee4b42f134ac542bf2303bb6a /spec/models/ci
parentb01bc0a0362fdc81f61941bee3b090267b6873c1 (diff)
CreatePipelineBuildsService would have created env
So we don't have to do it in CreateDeploymentService Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11695#note_31322649
Diffstat (limited to 'spec/models/ci')
-rw-r--r--spec/models/ci/build_spec.rb30
1 files changed, 0 insertions, 30 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 2ad7f27ffac..22ee469dd86 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -960,36 +960,6 @@ describe Ci::Build, :models do
end
end
- describe '#ensure_persisted_environment' do
- subject { job.ensure_persisted_environment }
-
- let(:job) do
- create(:ci_build,
- ref: 'master',
- environment: 'staging/$CI_COMMIT_REF_NAME')
- end
-
- context 'when there is no environment' do
- it 'creates one by the expanded name' do
- expect do
- expect(subject.name).to eq('staging/master')
- end.to change { Environment.count }.by(1)
- end
- end
-
- context 'when there is already an environment' do
- let!(:environment) do
- create(:environment, project: job.project, name: 'staging/master')
- end
-
- it 'returns the existing environment' do
- expect do
- expect(subject).to eq(environment)
- end.to change { Environment.count }.by(0)
- end
- end
- end
-
describe '#play' do
let(:build) { create(:ci_build, :manual, pipeline: pipeline) }