From b636cd6fd40ae05f22e732574da10af060273f9f Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sun, 31 May 2020 22:59:34 +0200 Subject: Handle expected errors in FileCreate & FileUpdate API (#11643) as title needed for #11641 --- integrations/api_repo_file_create_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'integrations/api_repo_file_create_test.go') 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, -- cgit v1.2.3