From 5be0a9fe4d7be65b4d3d98897372a46213216bd4 Mon Sep 17 00:00:00 2001 From: charlieablett Date: Wed, 23 Oct 2019 15:32:08 +1300 Subject: Tweak test to insulate against magic number changes --- spec/requests/api/graphql/gitlab_schema_spec.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'spec/requests/api/graphql') diff --git a/spec/requests/api/graphql/gitlab_schema_spec.rb b/spec/requests/api/graphql/gitlab_schema_spec.rb index 1f2bc67a9d2..1e799a0a42a 100644 --- a/spec/requests/api/graphql/gitlab_schema_spec.rb +++ b/spec/requests/api/graphql/gitlab_schema_spec.rb @@ -65,6 +65,7 @@ describe 'GitlabSchema configurations' do context 'a deep recursive non-introspective query' do it 'fails due to recursion, complexity and depth' do + allow(GitlabSchema).to receive(:max_query_complexity).and_return 1 query = File.read(Rails.root.join('spec/fixtures/api/graphql/recursive-query.graphql')) post_graphql(query, current_user: nil) -- cgit v1.2.1