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
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2019-03-13 16:38:28 +0300
committerJohn Jarvis <jarv@gitlab.com>2019-03-13 16:41:57 +0300
commitb2d300f3b7fe5afba0a353e4364c6e379c2211be (patch)
treee17472c6811c213a2da28b1754995f9ad7346c73 /spec
parentd5fa495b8b3f0f9aed4af43987b17a80c8e3e5e6 (diff)
Merge branch 'sh-fix-blank-codeowners-ce' into 'master'
Fix 500 error caused by CODEOWNERS with no matches Closes gitlab-ee#10282 See merge request gitlab-org/gitlab-ce!26072
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/user_extractor_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/user_extractor_spec.rb b/spec/lib/gitlab/user_extractor_spec.rb
index fcc05ab3a0c..6e2bb81fbda 100644
--- a/spec/lib/gitlab/user_extractor_spec.rb
+++ b/spec/lib/gitlab/user_extractor_spec.rb
@@ -48,6 +48,14 @@ describe Gitlab::UserExtractor do
it 'includes all mentioned usernames' do
expect(extractor.matches[:usernames]).to contain_exactly('user-1', 'user-2', 'user-4')
end
+
+ context 'input has no matching e-mail or usernames' do
+ it 'returns an empty list of users' do
+ extractor = described_class.new('My test')
+
+ expect(extractor.users).to be_empty
+ end
+ end
end
describe '#references' do