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
122cdb5b
Commit
122cdb5b
authored
Jul 14, 2020
by
Kerri Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add additional specs for Section support
parent
7a0fc86a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
3 deletions
+27
-3
ee/spec/fixtures/mixed_case_sectional_codeowners_example
ee/spec/fixtures/mixed_case_sectional_codeowners_example
+8
-0
ee/spec/fixtures/sectional_codeowners_example
ee/spec/fixtures/sectional_codeowners_example
+8
-0
ee/spec/lib/gitlab/code_owners/file_spec.rb
ee/spec/lib/gitlab/code_owners/file_spec.rb
+10
-2
ee/spec/services/ee/merge_requests/refresh_service_spec.rb
ee/spec/services/ee/merge_requests/refresh_service_spec.rb
+1
-1
No files found.
ee/spec/fixtures/mixed_case_sectional_codeowners_example
View file @
122cdb5b
...
...
@@ -53,3 +53,11 @@ model/db @gl-database
[dOcUmEnTaTiOn]
README.md @gl-docs
[Two Words]
README.md @gl-database
model/db @gl-database
[Double::Colon]
README.md @gl-database
model/db @gl-database
ee/spec/fixtures/sectional_codeowners_example
View file @
122cdb5b
...
...
@@ -53,3 +53,11 @@ model/db @gl-database
[Documentation]
README.md @gl-docs
[Two Words]
README.md @gl-database
model/db @gl-database
[Double::Colon]
README.md @gl-database
model/db @gl-database
ee/spec/lib/gitlab/code_owners/file_spec.rb
View file @
122cdb5b
...
...
@@ -63,8 +63,14 @@ RSpec.describe Gitlab::CodeOwners::File do
it
"is a hash sorted by sections without duplicates"
do
data
=
file
.
parsed_data
expect
(
data
.
keys
.
length
).
to
eq
(
3
)
expect
(
data
.
keys
).
to
contain_exactly
(
"codeowners"
,
"Documentation"
,
"Database"
)
expect
(
data
.
keys
.
length
).
to
eq
(
5
)
expect
(
data
.
keys
).
to
contain_exactly
(
"codeowners"
,
"Documentation"
,
"Database"
,
"Two Words"
,
"Double::Colon"
)
end
codeowners_section_paths
=
[
...
...
@@ -84,6 +90,8 @@ RSpec.describe Gitlab::CodeOwners::File do
"codeowners"
|
codeowners_section_paths
|
codeowners_section_owners
"Documentation"
|
[
"/**/README.md"
,
"/**/ee/docs"
,
"/**/docs"
]
|
[
"@gl-docs"
]
"Database"
|
[
"/**/README.md"
,
"/**/model/db"
]
|
[
"@gl-database"
]
"Two Words"
|
[
"/**/README.md"
,
"/**/model/db"
]
|
[
"@gl-database"
]
"Double::Colon"
|
[
"/**/README.md"
,
"/**/model/db"
]
|
[
"@gl-database"
]
end
with_them
do
...
...
ee/spec/services/ee/merge_requests/refresh_service_spec.rb
View file @
122cdb5b
...
...
@@ -125,7 +125,7 @@ RSpec.describe MergeRequests::RefreshService do
end
it_behaves_like
'creates an approval rule based on current diff'
do
let
(
:approval_rules_size
)
{
5
}
let
(
:approval_rules_size
)
{
7
}
end
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