Skip to content

Commit

Permalink
Merge branch 'enforce-template-uniqueness' into 'master'
Browse files Browse the repository at this point in the history
Ensure that template is used once

See merge request gitlab-org/gitlab-ce!27511
  • Loading branch information
grzesiek committed Jun 6, 2019
2 parents 52e88df + 076e16c commit 102c0e8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/lib/gitlab/template/gitlab_ci_yml_template_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
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
Expand Down

0 comments on commit 102c0e8

Please sign in to comment.