Commit 75225050 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'enforce-template-uniqueness-ee' into 'master'

EE: Ensure that template is used once

See merge request gitlab-org/gitlab-ee!11266
parents bfe4935d 07098c78
......@@ -17,6 +17,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