Commit 122cdb5b authored by Kerri Miller's avatar Kerri Miller

Add additional specs for Section support

parent 7a0fc86a
...@@ -53,3 +53,11 @@ model/db @gl-database ...@@ -53,3 +53,11 @@ model/db @gl-database
[dOcUmEnTaTiOn] [dOcUmEnTaTiOn]
README.md @gl-docs README.md @gl-docs
[Two Words]
README.md @gl-database
model/db @gl-database
[Double::Colon]
README.md @gl-database
model/db @gl-database
...@@ -53,3 +53,11 @@ model/db @gl-database ...@@ -53,3 +53,11 @@ model/db @gl-database
[Documentation] [Documentation]
README.md @gl-docs README.md @gl-docs
[Two Words]
README.md @gl-database
model/db @gl-database
[Double::Colon]
README.md @gl-database
model/db @gl-database
...@@ -63,8 +63,14 @@ RSpec.describe Gitlab::CodeOwners::File do ...@@ -63,8 +63,14 @@ RSpec.describe Gitlab::CodeOwners::File do
it "is a hash sorted by sections without duplicates" do it "is a hash sorted by sections without duplicates" do
data = file.parsed_data data = file.parsed_data
expect(data.keys.length).to eq(3) expect(data.keys.length).to eq(5)
expect(data.keys).to contain_exactly("codeowners", "Documentation", "Database") expect(data.keys).to contain_exactly(
"codeowners",
"Documentation",
"Database",
"Two Words",
"Double::Colon"
)
end end
codeowners_section_paths = [ codeowners_section_paths = [
...@@ -84,6 +90,8 @@ RSpec.describe Gitlab::CodeOwners::File do ...@@ -84,6 +90,8 @@ RSpec.describe Gitlab::CodeOwners::File do
"codeowners" | codeowners_section_paths | codeowners_section_owners "codeowners" | codeowners_section_paths | codeowners_section_owners
"Documentation" | ["/**/README.md", "/**/ee/docs", "/**/docs"] | ["@gl-docs"] "Documentation" | ["/**/README.md", "/**/ee/docs", "/**/docs"] | ["@gl-docs"]
"Database" | ["/**/README.md", "/**/model/db"] | ["@gl-database"] "Database" | ["/**/README.md", "/**/model/db"] | ["@gl-database"]
"Two Words" | ["/**/README.md", "/**/model/db"] | ["@gl-database"]
"Double::Colon" | ["/**/README.md", "/**/model/db"] | ["@gl-database"]
end end
with_them do with_them do
......
...@@ -125,7 +125,7 @@ RSpec.describe MergeRequests::RefreshService do ...@@ -125,7 +125,7 @@ RSpec.describe MergeRequests::RefreshService do
end end
it_behaves_like 'creates an approval rule based on current diff' do 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 end
end end
......
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