summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/lograge
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-20 12:26:25 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-20 12:26:25 +0000
commita09983ae35713f5a2bbb100981116d31ce99826e (patch)
tree2ee2af7bd104d57086db360a7e6d8c9d5d43667a /spec/lib/gitlab/lograge
parent18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff)
downloadgitlab-ce-a09983ae35713f5a2bbb100981116d31ce99826e.tar.gz
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'spec/lib/gitlab/lograge')
-rw-r--r--spec/lib/gitlab/lograge/custom_options_spec.rb18
1 files changed, 3 insertions, 15 deletions
diff --git a/spec/lib/gitlab/lograge/custom_options_spec.rb b/spec/lib/gitlab/lograge/custom_options_spec.rb
index ebf150d21ef..218007c6e2a 100644
--- a/spec/lib/gitlab/lograge/custom_options_spec.rb
+++ b/spec/lib/gitlab/lograge/custom_options_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-describe Gitlab::Lograge::CustomOptions do
+RSpec.describe Gitlab::Lograge::CustomOptions do
describe '.call' do
let(:params) do
{
@@ -44,18 +44,6 @@ describe Gitlab::Lograge::CustomOptions do
end
end
- context 'with transaction' do
- let(:transaction) { Gitlab::Metrics::WebTransaction.new({}) }
-
- before do
- allow(Gitlab::Metrics::Transaction).to receive(:current).and_return(transaction)
- end
-
- it 'adds db counters' do
- expect(subject).to include(:db_count, :db_write_count, :db_cached_count)
- end
- end
-
it 'adds the user id' do
expect(subject[:user_id]).to eq('test')
end
@@ -77,14 +65,14 @@ describe Gitlab::Lograge::CustomOptions do
end
end
- context 'when correlation_id is overriden' do
+ context 'when correlation_id is overridden' do
let(:correlation_id_key) { Labkit::Correlation::CorrelationId::LOG_KEY }
before do
event_payload[correlation_id_key] = '123456'
end
- it 'sets the overriden value' do
+ it 'sets the overridden value' do
expect(subject[correlation_id_key]).to eq('123456')
end
end