diff options
author | 6543 <6543@obermui.de> | 2020-05-31 22:59:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-31 21:59:34 +0100 |
commit | b636cd6fd40ae05f22e732574da10af060273f9f (patch) | |
tree | 83de939bca57ad39c588117678079d9dc3e64751 /integrations/api_repo_file_update_test.go | |
parent | 34b6983f566d3ced9d0ff9a4e1c2138b6d7fbcfe (diff) | |
download | gitea-b636cd6fd40ae05f22e732574da10af060273f9f.tar.gz gitea-b636cd6fd40ae05f22e732574da10af060273f9f.zip |
Handle expected errors in FileCreate & FileUpdate API (#11643)
as title
needed for #11641
Diffstat (limited to 'integrations/api_repo_file_update_test.go')
-rw-r--r-- | integrations/api_repo_file_update_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
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, |