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:
authorLin Jen-Shin <godfat@godfat.org>2019-07-30 17:29:02 +0300
committerLin Jen-Shin <godfat@godfat.org>2019-07-30 17:29:02 +0300
commit0c7e13f912847fe5fb7eeb93c1cfd4861d6ec44e (patch)
tree1851ea6a1f36f7092d9d6f6335a1e1f6f6c35375 /spec/lib/gitlab/danger
parentab509c78929d9b5f4e02d013e8911ac9d0a07aad (diff)
Update regular expression to extract stage name
Since now the role name can be: "<a href=\"/job-families/engineering/test-automation-engineer/\">Senior Test Automation Engineer</a>, Create:Source Code" We need to cope with </a> in the middle.
Diffstat (limited to 'spec/lib/gitlab/danger')
-rw-r--r--spec/lib/gitlab/danger/teammate_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/danger/teammate_spec.rb b/spec/lib/gitlab/danger/teammate_spec.rb
index 6a6cf1429c8..171f2344e82 100644
--- a/spec/lib/gitlab/danger/teammate_spec.rb
+++ b/spec/lib/gitlab/danger/teammate_spec.rb
@@ -40,6 +40,14 @@ describe Gitlab::Danger::Teammate do
it '#maintainer? returns false' do
expect(subject.maintainer?(project, :test, labels)).to be_falsey
end
+
+ context 'when hyperlink is mangled in the role' do
+ let(:role) { '<a href="#">Test Automation Engineer</a>, Create' }
+
+ it '#reviewer? returns true' do
+ expect(subject.reviewer?(project, :test, labels)).to be_truthy
+ end
+ end
end
context 'when role is Test Automation Engineer, Manage' do