Commit 076e16cb authored by Kamil Trzciński's avatar Kamil Trzciński

Ensure that template is used once

This adds additional test that make sure that each
template name is used exactly once across all folders
exposed
parent 26d57f96
......@@ -15,6 +15,13 @@ describe Gitlab::Template::GitlabCiYmlTemplate do
expect(all).to include('Docker')
expect(all).to include('Ruby')
end
it 'ensure that the template name is used exactly once' do
all = subject.all.group_by(&:name)
duplicates = all.select { |_, templates| templates.length > 1 }
expect(duplicates).to be_empty
end
end
describe '.find' 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