diff options
author | GitLab Release Tools Bot <delivery-team+release-tools@gitlab.com> | 2021-07-01 16:12:25 +0000 |
---|---|---|
committer | GitLab Release Tools Bot <delivery-team+release-tools@gitlab.com> | 2021-07-01 16:12:25 +0000 |
commit | e99202ecdbd29510742bb636f5cce64f9a99418d (patch) | |
tree | 4b5ed6ba8c66f5250b9d6850afe7e4d14969859e /spec/controllers/graphql_controller_spec.rb | |
parent | f37a805b0b472824349e747cf1f44f802363d126 (diff) | |
parent | e3fc6f91b5544391d310f68c62975505f5070106 (diff) | |
download | gitlab-ce-e99202ecdbd29510742bb636f5cce64f9a99418d.tar.gz |
Merge remote-tracking branch 'dev/13-12-stable' into 13-12-stable
Diffstat (limited to 'spec/controllers/graphql_controller_spec.rb')
-rw-r--r-- | spec/controllers/graphql_controller_spec.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/controllers/graphql_controller_spec.rb b/spec/controllers/graphql_controller_spec.rb index f2d86b1b166..aed97a01a72 100644 --- a/spec/controllers/graphql_controller_spec.rb +++ b/spec/controllers/graphql_controller_spec.rb @@ -44,7 +44,7 @@ RSpec.describe GraphqlController do expect(response).to have_gitlab_http_status(:ok) end - it 'returns access denied template when user cannot access API' do + it 'returns forbidden when user cannot access API' do # User cannot access API in a couple of cases # * When user is internal(like ghost users) # * When user is blocked @@ -54,7 +54,9 @@ RSpec.describe GraphqlController do post :execute expect(response).to have_gitlab_http_status(:forbidden) - expect(response).to render_template('errors/access_denied') + expect(json_response).to include( + 'errors' => include(a_hash_including('message' => /API not accessible/)) + ) end it 'updates the users last_activity_on field' do |