Commit 8888908f authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'issue_344279_template_finder_spec' into 'master'

Fix Style/OpenStructUse offenses template_finder_spec

See merge request gitlab-org/gitlab!75226
parents eeb11dbf 91922bea
......@@ -17,7 +17,6 @@ Style/OpenStructUse:
- spec/factories/go_module_versions.rb
- spec/factories/wiki_pages.rb
- spec/features/projects/clusters_spec.rb
- spec/finders/template_finder_spec.rb
- spec/graphql/mutations/branches/create_spec.rb
- spec/graphql/mutations/clusters/agent_tokens/create_spec.rb
- spec/graphql/mutations/clusters/agents/create_spec.rb
......
......@@ -153,7 +153,12 @@ RSpec.describe TemplateFinder do
let(:params) { {} }
subject(:result) { described_class.new(type, project, params).template_names.values.flatten.map { |el| OpenStruct.new(el) } }
let(:template_name_struct) { Struct.new(:name, :id, :key, :project_id, keyword_init: true) }
subject(:result) do
described_class.new(type, project, params).template_names.values.flatten
.map { |el| template_name_struct.new(el) }
end
where(:type, :vendored_name) do
:dockerfiles | 'Binary'
......
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