diff options
Diffstat (limited to 'spec/lib/gitlab/ci/pipeline/seed/deployment_spec.rb')
-rw-r--r-- | spec/lib/gitlab/ci/pipeline/seed/deployment_spec.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/seed/deployment_spec.rb b/spec/lib/gitlab/ci/pipeline/seed/deployment_spec.rb index ceb3cb28bc9..1f38c7aec63 100644 --- a/spec/lib/gitlab/ci/pipeline/seed/deployment_spec.rb +++ b/spec/lib/gitlab/ci/pipeline/seed/deployment_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Ci::Pipeline::Seed::Deployment do +RSpec.describe Gitlab::Ci::Pipeline::Seed::Deployment do let_it_be(:project, refind: true) { create(:project, :repository) } let(:pipeline) do create(:ci_pipeline, project: project, @@ -102,6 +102,19 @@ describe Gitlab::Ci::Pipeline::Seed::Deployment do end end + context 'when job has environment attribute with prepare action' do + let(:attributes) do + { + environment: 'production', + options: { environment: { name: 'production', action: 'prepare' } } + } + end + + it 'returns nothing' do + is_expected.to be_nil + end + end + context 'when job does not have environment attribute' do let(:attributes) { { name: 'test' } } |