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 | 16 |
1 files changed, 3 insertions, 13 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 4491c1cfa65..cbf35c1095a 100644 --- a/spec/lib/gitlab/graphql/query_analyzers/logger_analyzer_spec.rb +++ b/spec/lib/gitlab/graphql/query_analyzers/logger_analyzer_spec.rb @@ -4,19 +4,9 @@ require 'spec_helper' describe Gitlab::Graphql::QueryAnalyzers::LoggerAnalyzer do subject { described_class.new } - let(:query_string) { "abc" } - let(:provided_variables) { { a: 1, b: 2, c: 3 } } + let!(:now) { Gitlab::Metrics::System.monotonic_time } - let(:complexity) { 4 } - let(:depth) { 2 } - let(:initial_values) do - { time_started: now, - query_string: query_string, - variables: provided_variables, - complexity: nil, - depth: nil, - duration: nil } - end + before do allow(Gitlab::Metrics::System).to receive(:monotonic_time).and_return(now) end @@ -27,7 +17,7 @@ describe Gitlab::Graphql::QueryAnalyzers::LoggerAnalyzer do stub_feature_flags(graphql_logging: false) end - specify do + it 'enables the analyzer' do expect(subject.analyze?(anything)).to be_falsey end end |