From a09983ae35713f5a2bbb100981116d31ce99826e Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 20 Jul 2020 12:26:25 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-2-stable-ee --- spec/lib/gitlab/lograge/custom_options_spec.rb | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'spec/lib/gitlab/lograge') 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 -- cgit v1.2.1