summaryrefslogtreecommitdiff
path: root/spec/requests/api/internal
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-31 21:08:05 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-31 21:08:05 +0000
commitabae8f34f377519946a91101ef7abf504454531c (patch)
tree359fab0082860b6850d4a0a492b8f12eb3d4eb0b /spec/requests/api/internal
parent580622bdb3c762a8e89facd8a3946881ee480442 (diff)
downloadgitlab-ce-abae8f34f377519946a91101ef7abf504454531c.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/api/internal')
-rw-r--r--spec/requests/api/internal/base_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/requests/api/internal/base_spec.rb b/spec/requests/api/internal/base_spec.rb
index 77501c3a136..06ba0bd30ff 100644
--- a/spec/requests/api/internal/base_spec.rb
+++ b/spec/requests/api/internal/base_spec.rb
@@ -217,7 +217,7 @@ describe API::Internal::Base do
it "finds the key" do
get(api('/internal/authorized_keys'), params: { fingerprint: key.fingerprint, secret_token: secret_token })
- expect(response.status).to eq(200)
+ expect(response).to have_gitlab_http_status(:ok)
expect(json_response["key"]).to eq(key.key)
end
end
@@ -226,7 +226,7 @@ describe API::Internal::Base do
it "returns 404" do
get(api('/internal/authorized_keys'), params: { fingerprint: "no:t-:va:li:d0", secret_token: secret_token })
- expect(response.status).to eq(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
@@ -234,7 +234,7 @@ describe API::Internal::Base do
it "returns 404" do
get(api('/internal/authorized_keys'), params: { fingerprint: "#{key.fingerprint[0..5]}%", secret_token: secret_token })
- expect(response.status).to eq(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
@@ -242,20 +242,20 @@ describe API::Internal::Base do
it "finds the key" do
get(api('/internal/authorized_keys'), params: { key: key.key.split[1], secret_token: secret_token })
- expect(response.status).to eq(200)
+ expect(response).to have_gitlab_http_status(:ok)
expect(json_response["key"]).to eq(key.key)
end
it "returns 404 with a partial key" do
get(api('/internal/authorized_keys'), params: { key: key.key.split[1][0...-3], secret_token: secret_token })
- expect(response.status).to eq(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
it "returns 404 with an not valid base64 string" do
get(api('/internal/authorized_keys'), params: { key: "whatever!", secret_token: secret_token })
- expect(response.status).to eq(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
end
@@ -812,7 +812,7 @@ describe API::Internal::Base do
project.add_developer(user)
push(key, project, 'web')
- expect(response.status).to eq(200)
+ expect(response).to have_gitlab_http_status(:ok)
expect(json_response['status']).to be_truthy
end
end