Commit 9747b8e0 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch '344279-design-openstruct-fix' into 'master'

Fixes OpenStruct use design_management

See merge request gitlab-org/gitlab!74408
parents 0a073d8a 459ad59f
......@@ -30,8 +30,6 @@ Style/OpenStructUse:
- spec/lib/gitlab/gitaly_client/diff_stitcher_spec.rb
- spec/lib/gitlab/legacy_github_import/project_creator_spec.rb
- spec/lib/gitlab/quick_actions/command_definition_spec.rb
- spec/models/design_management/design_action_spec.rb
- spec/models/design_management/design_at_version_spec.rb
- spec/services/projects/import_service_spec.rb
- spec/services/system_note_service_spec.rb
- spec/support/helpers/import_spec_helper.rb
......
......@@ -46,7 +46,7 @@ RSpec.describe DesignManagement::DesignAction do
describe '#gitaly_action' do
let(:path) { 'some/path/somewhere' }
let(:design) { OpenStruct.new(full_path: path) }
let(:design) { double('path', full_path: path) }
subject { described_class.new(design, action, content) }
......@@ -75,7 +75,7 @@ RSpec.describe DesignManagement::DesignAction do
describe '#issue_id' do
let(:issue_id) { :foo }
let(:design) { OpenStruct.new(issue_id: issue_id) }
let(:design) { double('id', issue_id: issue_id) }
subject { described_class.new(design, :delete) }
......
......@@ -59,7 +59,7 @@ RSpec.describe DesignManagement::DesignAtVersion do
it 'rejects objects with the same id and the wrong class' do
dav = build_stubbed(:design_at_version)
expect(dav).not_to eq(OpenStruct.new(id: dav.id))
expect(dav).not_to eq(double('id', id: dav.id))
end
it 'expects objects to be of the same type, not subtypes' 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