summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/danger/teammate_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/danger/teammate_spec.rb')
-rw-r--r--spec/lib/gitlab/danger/teammate_spec.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/lib/gitlab/danger/teammate_spec.rb b/spec/lib/gitlab/danger/teammate_spec.rb
index 6a6cf1429c8..61b43e343c1 100644
--- a/spec/lib/gitlab/danger/teammate_spec.rb
+++ b/spec/lib/gitlab/danger/teammate_spec.rb
@@ -28,7 +28,7 @@ describe Gitlab::Danger::Teammate do
end
context 'when labels contain Create and the category is test' do
- let(:labels) { ['Create'] }
+ let(:labels) { ['devops::create'] }
context 'when role is Test Automation Engineer, Create' do
let(:role) { 'Test Automation Engineer, Create' }
@@ -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