Commit 85b48074 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents 0f1fbc0e fff0fc7b
......@@ -39,7 +39,7 @@ module Gitlab
def has_capability?(project, category, kind, labels)
case category
when :test
area = role[/Test Automation Engineer, (\w+)/, 1]
area = role[/Test Automation Engineer(?:.*?, (\w+))/, 1]
area && labels.any?(area) if kind == :reviewer
else
......
# frozen_string_literal: true
require 'rails_helper'
require 'spec_helper'
describe Projects::ErrorTrackingController do
set(:project) { create(:project) }
......
# frozen_string_literal: true
require 'rails_helper'
require 'spec_helper'
describe 'Display system header and footer bar' do
let(:header_message) { "Foo" }
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment