Commit 91245e2f authored by Igor Drozdov's avatar Igor Drozdov

Merge branch '344279-exception-logger-fix' into 'master'

Fix OpenStruct use in exception_logger_spec

See merge request gitlab-org/gitlab!74421
parents 4e80d314 dfaa8a39
......@@ -2594,7 +2594,6 @@ Style/OpenStructUse:
- 'spec/lib/gitlab/database/migrations/runner_spec.rb'
- 'spec/lib/gitlab/gitaly_client/blobs_stitcher_spec.rb'
- 'spec/lib/gitlab/gitaly_client/diff_stitcher_spec.rb'
- 'spec/lib/gitlab/grape_logging/loggers/exception_logger_spec.rb'
- 'spec/lib/gitlab/graphql/pagination/keyset/connection_generic_keyset_spec.rb'
- 'spec/lib/gitlab/graphql/pagination/keyset/connection_spec.rb'
- 'spec/lib/gitlab/legacy_github_import/project_creator_spec.rb'
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
RSpec.describe Gitlab::GrapeLogging::Loggers::ExceptionLogger do
let(:mock_request) { OpenStruct.new(env: {}) }
let(:mock_request) { double('env', env: {}) }
let(:response_body) { nil }
describe ".parameters" do
......@@ -76,7 +76,7 @@ RSpec.describe Gitlab::GrapeLogging::Loggers::ExceptionLogger do
describe 'when an exception is available' do
let(:exception) { RuntimeError.new('This is a test') }
let(:mock_request) do
OpenStruct.new(
double('env',
env: {
::API::Helpers::API_EXCEPTION_ENV => exception
}
......
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