summaryrefslogtreecommitdiff
path: root/spec/initializers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-23 19:44:23 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-23 19:44:23 +0000
commit6b96d119aec0ba674cca2c380cf60f1500306612 (patch)
treef7742d802f557d04e2144b06a2b47719fbd58b82 /spec/initializers
parent8b7c4494871c7d69ac7bc59839bdce6ff2937f95 (diff)
downloadgitlab-ce-6b96d119aec0ba674cca2c380cf60f1500306612.tar.gz
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/initializers')
-rw-r--r--spec/initializers/lograge_spec.rb12
1 files changed, 2 insertions, 10 deletions
diff --git a/spec/initializers/lograge_spec.rb b/spec/initializers/lograge_spec.rb
index f283ac100a9..9e5eab4fc6b 100644
--- a/spec/initializers/lograge_spec.rb
+++ b/spec/initializers/lograge_spec.rb
@@ -99,6 +99,8 @@ describe 'lograge', type: :request do
end
context 'with a log subscriber' do
+ include_context 'parsed logs'
+
let(:subscriber) { Lograge::LogSubscribers::ActionController.new }
let(:event) do
@@ -119,16 +121,6 @@ describe 'lograge', type: :request do
)
end
- let(:log_output) { StringIO.new }
- let(:logger) do
- Logger.new(log_output).tap { |logger| logger.formatter = ->(_, _, _, msg) { msg } }
- end
- let(:log_data) { Gitlab::Json.parse(log_output.string) }
-
- before do
- Lograge.logger = logger
- end
-
describe 'with an exception' do
let(:exception) { RuntimeError.new('bad request') }
let(:backtrace) { caller }