Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/api/graphql_spec.rb')
-rw-r--r--spec/requests/api/graphql_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/requests/api/graphql_spec.rb b/spec/requests/api/graphql_spec.rb
index 3bd59450d49..d94257c61eb 100644
--- a/spec/requests/api/graphql_spec.rb
+++ b/spec/requests/api/graphql_spec.rb
@@ -67,10 +67,10 @@ RSpec.describe 'GraphQL' do
context 'when there is an error in the logger' do
before do
- logger_analyzer = GitlabSchema.query_analyzers.find do |qa|
- qa.is_a? Gitlab::Graphql::QueryAnalyzers::LoggerAnalyzer
- end
- allow(logger_analyzer).to receive(:process_variables)
+ allow(GraphQL::Analysis::AST).to receive(:analyze_query)
+ .and_call_original
+ allow(GraphQL::Analysis::AST).to receive(:analyze_query)
+ .with(anything, Gitlab::Graphql::QueryAnalyzers::AST::LoggerAnalyzer::ALL_ANALYZERS, anything)
.and_raise(StandardError.new("oh noes!"))
end