diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-19 15:57:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-19 15:57:54 +0300 |
commit | 419c53ec62de6e97a517abd5fdd4cbde3a942a34 (patch) | |
tree | 1f43a548b46bca8a5fb8fe0c31cef1883d49c5b6 /spec/requests/api/graphql_spec.rb | |
parent | 1da20d9135b3ad9e75e65b028bffc921aaf8deb7 (diff) |
Add latest changes from gitlab-org/gitlab@16-5-stable-eev16.5.0-rc42
Diffstat (limited to 'spec/requests/api/graphql_spec.rb')
-rw-r--r-- | spec/requests/api/graphql_spec.rb | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/spec/requests/api/graphql_spec.rb b/spec/requests/api/graphql_spec.rb index 8a3c5261eb6..2e6ec6d02e7 100644 --- a/spec/requests/api/graphql_spec.rb +++ b/spec/requests/api/graphql_spec.rb @@ -42,13 +42,6 @@ RSpec.describe 'GraphQL', feature_category: :shared do post_graphql(query, variables: variables) end - - it 'does not instantiate any query analyzers' do # they are static and re-used - expect(GraphQL::Analysis::QueryComplexity).not_to receive(:new) - expect(GraphQL::Analysis::QueryDepth).not_to receive(:new) - - 2.times { post_graphql(query, variables: variables) } - end end context 'with no variables' do @@ -282,9 +275,9 @@ RSpec.describe 'GraphQL', feature_category: :shared do it 'does not authenticate user' do post_graphql(query, headers: { 'PRIVATE-TOKEN' => token.token }) - expect(response).to have_gitlab_http_status(:ok) + expect(response).to have_gitlab_http_status(:unauthorized) - expect(graphql_data['echo']).to eq('nil says: Hello world') + expect_graphql_errors_to_include('Invalid token') end end @@ -308,9 +301,9 @@ RSpec.describe 'GraphQL', feature_category: :shared do post_graphql(query, headers: { 'PRIVATE-TOKEN' => token.token }) - expect(response).to have_gitlab_http_status(:ok) + expect(response).to have_gitlab_http_status(:unauthorized) - expect(graphql_data['echo']).to eq('nil says: Hello world') + expect_graphql_errors_to_include('Invalid token') end end end |