diff options
Diffstat (limited to 'spec/lib/gitlab/lograge')
-rw-r--r-- | spec/lib/gitlab/lograge/custom_options_spec.rb | 18 |
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 |