Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1e9fb72e
Commit
1e9fb72e
authored
May 11, 2020
by
Kerri Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure sectional codeowners doesn't break #members
parent
6bb5e629
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
4 deletions
+28
-4
ee/spec/lib/gitlab/code_owners/loader_spec.rb
ee/spec/lib/gitlab/code_owners/loader_spec.rb
+28
-4
No files found.
ee/spec/lib/gitlab/code_owners/loader_spec.rb
View file @
1e9fb72e
...
...
@@ -128,12 +128,36 @@ describe Gitlab::CodeOwners::Loader do
end
describe
'#members'
do
shared_examples_for
"returns users for passed path"
do
it
"returns users mentioned for the passed path do"
do
expect
(
loader
.
members
).
to
contain_exactly
(
owner_1
,
email_owner
,
documentation_owner
)
end
end
context
"when sectional_codeowners is disabled"
do
before
do
stub_feature_flags
(
sectional_codeowners:
false
)
end
it
'returns users mentioned for the passed path'
do
expect
(
loader
.
members
).
to
contain_exactly
(
owner_1
,
email_owner
,
documentation_owner
)
it_behaves_like
"returns users for passed path"
end
context
"when sectional_codeowners is enabled"
do
let
(
:codeowner_content
)
do
<<~
CODEOWNERS
[Documentation]
docs/* @documentation-owner
docs/CODEOWNERS @owner-1 owner2@gitlab.org @owner-3 @documentation-owner
[Testing]
spec/* @test-owner @test-group @test-group/nested-group
CODEOWNERS
end
before
do
stub_feature_flags
(
sectional_codeowners:
true
)
end
it_behaves_like
"returns users for passed path"
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment