diff options
Diffstat (limited to 'spec/lib/gitlab/graphql/query_analyzers/logger_analyzer_spec.rb')
-rw-r--r-- | spec/lib/gitlab/graphql/query_analyzers/logger_analyzer_spec.rb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/spec/lib/gitlab/graphql/query_analyzers/logger_analyzer_spec.rb b/spec/lib/gitlab/graphql/query_analyzers/logger_analyzer_spec.rb index fc723138d88..dee8f9e3c64 100644 --- a/spec/lib/gitlab/graphql/query_analyzers/logger_analyzer_spec.rb +++ b/spec/lib/gitlab/graphql/query_analyzers/logger_analyzer_spec.rb @@ -18,12 +18,6 @@ RSpec.describe Gitlab::Graphql::QueryAnalyzers::LoggerAnalyzer do GRAPHQL end - describe 'variables' do - subject { initial_value.fetch(:variables) } - - it { is_expected.to eq('{:body=>"[FILTERED]"}') } - end - describe '#final_value' do let(:monotonic_time_before) { 42 } let(:monotonic_time_after) { 500 } @@ -42,7 +36,14 @@ RSpec.describe Gitlab::Graphql::QueryAnalyzers::LoggerAnalyzer do it 'inserts duration in seconds to memo and sets request store' do expect { final_value }.to change { memo[:duration_s] }.to(monotonic_time_duration) - .and change { RequestStore.store[:graphql_logs] }.to([memo]) + .and change { RequestStore.store[:graphql_logs] }.to([{ + complexity: 4, + depth: 2, + operation_name: query.operation_name, + used_deprecated_fields: [], + used_fields: [], + variables: { body: "[FILTERED]" }.to_s + }]) end end end |