diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 15:26:25 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 15:26:25 +0300 |
commit | a09983ae35713f5a2bbb100981116d31ce99826e (patch) | |
tree | 2ee2af7bd104d57086db360a7e6d8c9d5d43667a /spec/lib/gitlab/ci/pipeline/chain/command_spec.rb | |
parent | 18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff) |
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'spec/lib/gitlab/ci/pipeline/chain/command_spec.rb')
-rw-r--r-- | spec/lib/gitlab/ci/pipeline/chain/command_spec.rb | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/chain/command_spec.rb b/spec/lib/gitlab/ci/pipeline/chain/command_spec.rb index 56707f4e6e4..bc2012e83bd 100644 --- a/spec/lib/gitlab/ci/pipeline/chain/command_spec.rb +++ b/spec/lib/gitlab/ci/pipeline/chain/command_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Ci::Pipeline::Chain::Command do +RSpec.describe Gitlab::Ci::Pipeline::Chain::Command do let_it_be(:project) { create(:project, :repository) } describe '#initialize' do @@ -270,4 +270,29 @@ describe Gitlab::Ci::Pipeline::Chain::Command do it { is_expected. to eq(true) } end end + + describe '#dangling_build?' do + let(:project) { create(:project, :repository) } + let(:command) { described_class.new(project: project, source: source) } + + subject { command.dangling_build? } + + context 'when source is :webide' do + let(:source) { :webide } + + it { is_expected.to eq(true) } + end + + context 'when source is :ondemand_dast_scan' do + let(:source) { :ondemand_dast_scan } + + it { is_expected.to eq(true) } + end + + context 'when source something else' do + let(:source) { :web } + + it { is_expected.to eq(false) } + end + end end |