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
path: root/spec/lib
diff options
context:
space:
mode:
authorKyle Wiebers <kwiebers@gitlab.com>2019-09-04 01:02:55 +0300
committerKyle Wiebers <kwiebers@gitlab.com>2019-09-05 17:02:47 +0300
commit79ec54c39e8ecc397961a8b76dea239e52c7753c (patch)
treec8c2eb0a4b41998919cfff923d2b3d03514d66c3 /spec/lib
parentbe920a6056b1b2bbc376af43d9aef8df92f090f6 (diff)
Add Danger Roulette rules for pipeline files
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/danger/helper_spec.rb6
-rw-r--r--spec/lib/gitlab/danger/teammate_spec.rb12
2 files changed, 17 insertions, 1 deletions
diff --git a/spec/lib/gitlab/danger/helper_spec.rb b/spec/lib/gitlab/danger/helper_spec.rb
index 2990594c538..710564b7540 100644
--- a/spec/lib/gitlab/danger/helper_spec.rb
+++ b/spec/lib/gitlab/danger/helper_spec.rb
@@ -168,9 +168,13 @@ describe Gitlab::Danger::Helper do
'Gemfile.lock' | :backend
'Procfile' | :backend
'Rakefile' | :backend
- '.gitlab-ci.yml' | :backend
'FOO_VERSION' | :backend
+ '.gitlab-ci.yml' | :engineering_productivity
+ '.gitlab/ci/cng.gitlab-ci.yml' | :engineering_productivity
+ '.gitlab/ci/ee-specific-checks.gitlab-ci.yml' | :engineering_productivity
+ 'lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml' | :backend
+
'ee/FOO_VERSION' | :unknown
'db/schema.rb' | :database
diff --git a/spec/lib/gitlab/danger/teammate_spec.rb b/spec/lib/gitlab/danger/teammate_spec.rb
index afbc3896a70..ca036390bde 100644
--- a/spec/lib/gitlab/danger/teammate_spec.rb
+++ b/spec/lib/gitlab/danger/teammate_spec.rb
@@ -65,6 +65,18 @@ describe Gitlab::Danger::Teammate do
expect(subject.reviewer?(project, :test, labels)).to be_falsey
end
end
+
+ context 'when role is Backend Engineer, Engineering Productivity' do
+ let(:role) { 'Backend Engineer, Engineering Productivity' }
+
+ it '#reviewer? returns true' do
+ expect(subject.reviewer?(project, :engineering_productivity, labels)).to be_truthy
+ end
+
+ it '#maintainer? returns false' do
+ expect(subject.maintainer?(project, :engineering_productivity, labels)).to be_falsey
+ end
+ end
end
end