diff options
Diffstat (limited to 'integrations')
-rw-r--r-- | integrations/api_repo_file_create_test.go | 2 | ||||
-rw-r--r-- | integrations/api_repo_file_update_test.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/integrations/api_repo_file_create_test.go b/integrations/api_repo_file_create_test.go index 3c8b50d5d1..853224f091 100644 --- a/integrations/api_repo_file_create_test.go +++ b/integrations/api_repo_file_create_test.go @@ -189,7 +189,7 @@ func TestAPICreateFile(t *testing.T) { treePath = "README.md" url = fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s?token=%s", user2.Name, repo1.Name, treePath, token2) req = NewRequestWithJSON(t, "POST", url, &createFileOptions) - resp = session.MakeRequest(t, req, http.StatusInternalServerError) + resp = session.MakeRequest(t, req, http.StatusUnprocessableEntity) expectedAPIError := context.APIError{ Message: "repository file already exists [path: " + treePath + "]", URL: setting.API.SwaggerURL, diff --git a/integrations/api_repo_file_update_test.go b/integrations/api_repo_file_update_test.go index 369e48d646..69a9463774 100644 --- a/integrations/api_repo_file_update_test.go +++ b/integrations/api_repo_file_update_test.go @@ -208,7 +208,7 @@ func TestAPIUpdateFile(t *testing.T) { updateFileOptions.SHA = "badsha" url = fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s?token=%s", user2.Name, repo1.Name, treePath, token2) req = NewRequestWithJSON(t, "PUT", url, &updateFileOptions) - resp = session.MakeRequest(t, req, http.StatusInternalServerError) + resp = session.MakeRequest(t, req, http.StatusUnprocessableEntity) expectedAPIError := context.APIError{ Message: "sha does not match [given: " + updateFileOptions.SHA + ", expected: " + correctSHA + "]", URL: setting.API.SwaggerURL, |