diff options
author | charlie ablett <cablett@gitlab.com> | 2019-05-23 22:43:47 +0000 |
---|---|---|
committer | charlieablett <cablett@gitlab.com> | 2019-05-31 19:57:02 +1200 |
commit | 699532232ca27e6079c553261e0ab1d17317472a (patch) | |
tree | 47c7e56de28ba1857add8ea13627de07936e117e /spec/lib/gitlab/graphql | |
parent | 5f0c230a18b677bd4ec6a4a54085775b0c69a498 (diff) | |
download | gitlab-ce-699532232ca27e6079c553261e0ab1d17317472a.tar.gz |
Apply reviewer feedback59587-add-graphql-logging
- Comply doc with guidelines
- Improve tests for readability and completeness
- Separate out phases visually with newlines
- Add `format_message` test
- test readability
- code and test structure/styling
- static query analyzers
- call `as_json` on `provided_variables`
- add exception handling
Diffstat (limited to 'spec/lib/gitlab/graphql')
-rw-r--r-- | spec/lib/gitlab/graphql/query_analyzers/logger_analyzer_spec.rb | 10 |
1 files changed, 2 insertions, 8 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 cbf35c1095a..66033736e01 100644 --- a/spec/lib/gitlab/graphql/query_analyzers/logger_analyzer_spec.rb +++ b/spec/lib/gitlab/graphql/query_analyzers/logger_analyzer_spec.rb @@ -5,25 +5,19 @@ require 'spec_helper' describe Gitlab::Graphql::QueryAnalyzers::LoggerAnalyzer do subject { described_class.new } - let!(:now) { Gitlab::Metrics::System.monotonic_time } - - before do - allow(Gitlab::Metrics::System).to receive(:monotonic_time).and_return(now) - end - describe '#analyze?' do context 'feature flag disabled' do before do stub_feature_flags(graphql_logging: false) end - it 'enables the analyzer' do + it 'disables the analyzer' do expect(subject.analyze?(anything)).to be_falsey end end context 'feature flag enabled by default' do - specify do + it 'enables the analyzer' do expect(subject.analyze?(anything)).to be_truthy end end |