blob: 66033736e01ba1b38e69c119651e2161f01ae36c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::Graphql::QueryAnalyzers::LoggerAnalyzer do
subject { described_class.new }
describe '#analyze?' do
context 'feature flag disabled' do
before do
stub_feature_flags(graphql_logging: false)
end
it 'disables the analyzer' do
expect(subject.analyze?(anything)).to be_falsey
end
end
context 'feature flag enabled by default' do
it 'enables the analyzer' do
expect(subject.analyze?(anything)).to be_truthy
end
end
end
end
|