summaryrefslogtreecommitdiff
path: root/spec/helpers/ci/pipelines_helper_spec.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
committerRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
commit6438df3a1e0fb944485cebf07976160184697d72 (patch)
tree00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /spec/helpers/ci/pipelines_helper_spec.rb
parent42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff)
downloadgitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'spec/helpers/ci/pipelines_helper_spec.rb')
-rw-r--r--spec/helpers/ci/pipelines_helper_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/helpers/ci/pipelines_helper_spec.rb b/spec/helpers/ci/pipelines_helper_spec.rb
index a96d6e7711f..94b5e707d73 100644
--- a/spec/helpers/ci/pipelines_helper_spec.rb
+++ b/spec/helpers/ci/pipelines_helper_spec.rb
@@ -52,4 +52,23 @@ RSpec.describe Ci::PipelinesHelper do
end
end
end
+
+ describe 'has_gitlab_ci?' do
+ using RSpec::Parameterized::TableSyntax
+
+ subject(:has_gitlab_ci?) { helper.has_gitlab_ci?(project) }
+
+ let(:project) { double(:project, has_ci?: has_ci?, builds_enabled?: builds_enabled?) }
+
+ where(:builds_enabled?, :has_ci?, :result) do
+ true | true | true
+ true | false | false
+ false | true | false
+ false | false | false
+ end
+
+ with_them do
+ it { expect(has_gitlab_ci?).to eq(result) }
+ end
+ end
end