diff --git a/src/handlers/docs/handleDocUpload_test.go b/src/handlers/docs/handleDocUpload_test.go index c560162..c93a54d 100644 --- a/src/handlers/docs/handleDocUpload_test.go +++ b/src/handlers/docs/handleDocUpload_test.go @@ -25,15 +25,6 @@ func TestHandleDocUpload_NoError(t *testing.T) { defer writer.Close() part, _ := writer.CreateFormFile("doc", "filename.txt") part.Write(testDataFile) - - //h := make(textproto.MIMEHeader) - //h.Set("Content-Disposition", fmt.Sprintf( - // `form-data; name="%s"; filename="%s"`, - // EscapeQuotes("doc"), - // EscapeQuotes("file.txt"), - //)) - //h.Set("Content-Type", "text/plain; charset=utf-8") - //part, _ := writer.CreatePart(h) }() // init request @@ -129,7 +120,6 @@ func TestHandleDocUpload_ReadFailed_EOF(t *testing.T) { HandleDocUpload(c) // assert - fmt.Println(w.Body.String()) require.Equal(t, http.StatusInternalServerError, w.Result().StatusCode) require.Equal(t, w.Body.String(), "Failed to read file: EOF") } @@ -254,7 +244,7 @@ func TestHandleDocUpload_FileExist(t *testing.T) { // second handling HandleDocUpload(cc) - //// first statement + // second statement require.Equal(t, http.StatusConflict, ww.Result().StatusCode) require.Equal(t, ww.Body.String(), "\"File already exists\"") } diff --git a/src/handlers/image/handleImageUpload_test.go b/src/handlers/image/handleImageUpload_test.go index 7c1635b..692276d 100644 --- a/src/handlers/image/handleImageUpload_test.go +++ b/src/handlers/image/handleImageUpload_test.go @@ -120,7 +120,6 @@ func TestHandleImageUpload_ReadFailed_EOF(t *testing.T) { HandleImageUpload(c) // assert - fmt.Println(w.Body.String()) require.Equal(t, http.StatusInternalServerError, w.Result().StatusCode) require.Equal(t, w.Body.String(), "Failed to read file: EOF") } @@ -248,7 +247,7 @@ func TestHandleImageUpload_FileExist(t *testing.T) { // second handling HandleImageUpload(cc) - //// first statement + // second statement require.Equal(t, http.StatusConflict, ww.Result().StatusCode) require.Equal(t, ww.Body.String(), "\"File already exists\"") }