Commit e52f31cd authored by mehulsharma's avatar mehulsharma Committed by Mehul Sharma

Fix OpenStruct use

Fixes OpenStruct in accept_spec since Ruby 3 discourages it

Changelog: changed
parent 81b4cccb
......@@ -2561,7 +2561,6 @@ Style/OpenStructUse:
- 'ee/spec/features/projects/new_project_spec.rb'
- 'ee/spec/finders/template_finder_spec.rb'
- 'ee/spec/graphql/ee/resolvers/board_lists_resolver_spec.rb'
- 'ee/spec/graphql/mutations/merge_requests/accept_spec.rb'
- 'ee/spec/graphql/resolvers/board_groupings/epics_resolvers_spec.rb'
- 'ee/spec/helpers/billing_plans_helper_spec.rb'
- 'ee/spec/helpers/ee/blob_helper_spec.rb'
......
......@@ -4,13 +4,14 @@ require 'spec_helper'
RSpec.describe Mutations::MergeRequests::Accept do
let_it_be(:user) { create(:user) }
let(:project) { create(:project, :public, :repository) }
subject(:mutation) { described_class.new(context: context, object: nil, field: nil) }
let_it_be(:context) do
let(:context) do
GraphQL::Query::Context.new(
query: OpenStruct.new(schema: GitlabSchema),
query: double('query', schema: GitlabSchema),
values: { current_user: user },
object: nil
)
......
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