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:
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