diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-26 21:09:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-26 21:09:24 +0300 |
commit | 619d0b6922a6cf95d291fbbf5fa3d09e772a1ea8 (patch) | |
tree | fb8f8e036cec1b32166206bb5102af6c5dca8cfe /spec/requests/api | |
parent | 17ab40ca089e1aef61a83f77ab6df62a72f6ce06 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/api')
-rw-r--r-- | spec/requests/api/internal/base_spec.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/requests/api/internal/base_spec.rb b/spec/requests/api/internal/base_spec.rb index c3b5f9ded21..4249ce105c9 100644 --- a/spec/requests/api/internal/base_spec.rb +++ b/spec/requests/api/internal/base_spec.rb @@ -409,7 +409,7 @@ describe API::Internal::Base do it do pull(key, project) - expect(response).to have_gitlab_http_status(:unauthorized) + expect(response).to have_gitlab_http_status(:forbidden) expect(json_response["status"]).to be_falsey expect(user.reload.last_activity_on).to be_nil end @@ -419,7 +419,7 @@ describe API::Internal::Base do it do push(key, project) - expect(response).to have_gitlab_http_status(:unauthorized) + expect(response).to have_gitlab_http_status(:forbidden) expect(json_response["status"]).to be_falsey expect(user.reload.last_activity_on).to be_nil end @@ -518,7 +518,7 @@ describe API::Internal::Base do it do pull(key, personal_project) - expect(response).to have_gitlab_http_status(:unauthorized) + expect(response).to have_gitlab_http_status(:forbidden) expect(json_response["status"]).to be_falsey expect(user.reload.last_activity_on).to be_nil end @@ -528,7 +528,7 @@ describe API::Internal::Base do it do push(key, personal_project) - expect(response).to have_gitlab_http_status(:unauthorized) + expect(response).to have_gitlab_http_status(:forbidden) expect(json_response["status"]).to be_falsey expect(user.reload.last_activity_on).to be_nil end @@ -572,7 +572,7 @@ describe API::Internal::Base do it do push(key, project) - expect(response).to have_gitlab_http_status(:unauthorized) + expect(response).to have_gitlab_http_status(:forbidden) expect(json_response["status"]).to be_falsey end end @@ -654,7 +654,7 @@ describe API::Internal::Base do it 'rejects the SSH push' do push(key, project) - expect(response.status).to eq(401) + expect(response).to have_gitlab_http_status(:forbidden) expect(json_response['status']).to be_falsey expect(json_response['message']).to eq 'Git access over SSH is not allowed' end @@ -662,7 +662,7 @@ describe API::Internal::Base do it 'rejects the SSH pull' do pull(key, project) - expect(response.status).to eq(401) + expect(response).to have_gitlab_http_status(:forbidden) expect(json_response['status']).to be_falsey expect(json_response['message']).to eq 'Git access over SSH is not allowed' end @@ -676,7 +676,7 @@ describe API::Internal::Base do it 'rejects the HTTP push' do push(key, project, 'http') - expect(response.status).to eq(401) + expect(response).to have_gitlab_http_status(:forbidden) expect(json_response['status']).to be_falsey expect(json_response['message']).to eq 'Git access over HTTP is not allowed' end @@ -684,7 +684,7 @@ describe API::Internal::Base do it 'rejects the HTTP pull' do pull(key, project, 'http') - expect(response.status).to eq(401) + expect(response).to have_gitlab_http_status(:forbidden) expect(json_response['status']).to be_falsey expect(json_response['message']).to eq 'Git access over HTTP is not allowed' end |