Fix tests

This commit is contained in:
Naren Venkataraman 2015-11-04 04:56:32 -05:00
parent db67b862ae
commit 7898128700
2 changed files with 6 additions and 0 deletions

View File

@ -117,6 +117,7 @@ func TestMethodOverride(t *testing.T) {
ReqHeader: map[string]string{
"Tus-Resumable": "1.0.0",
"Upload-Offset": "5",
"Content-Type": "application/offset+octet-stream",
"X-HTTP-Method-Override": "PATCH",
},
ReqBody: strings.NewReader("hello"),

View File

@ -62,6 +62,7 @@ func TestPatch(t *testing.T) {
URL: "yes",
ReqHeader: map[string]string{
"Tus-Resumable": "1.0.0",
"Content-Type": "application/offset+octet-stream",
"Upload-Offset": "5",
},
ReqBody: strings.NewReader("hello"),
@ -77,6 +78,7 @@ func TestPatch(t *testing.T) {
URL: "no",
ReqHeader: map[string]string{
"Tus-Resumable": "1.0.0",
"Content-Type": "application/offset+octet-stream",
"Upload-Offset": "5",
},
Code: http.StatusNotFound,
@ -88,6 +90,7 @@ func TestPatch(t *testing.T) {
URL: "yes",
ReqHeader: map[string]string{
"Tus-Resumable": "1.0.0",
"Content-Type": "application/offset+octet-stream",
"Upload-Offset": "4",
},
Code: http.StatusConflict,
@ -99,6 +102,7 @@ func TestPatch(t *testing.T) {
URL: "yes",
ReqHeader: map[string]string{
"Tus-Resumable": "1.0.0",
"Content-Type": "application/offset+octet-stream",
"Upload-Offset": "5",
},
ReqBody: strings.NewReader("hellothisismorethan15bytes"),
@ -194,6 +198,7 @@ func TestPatchOverflow(t *testing.T) {
URL: "yes",
ReqHeader: map[string]string{
"Tus-Resumable": "1.0.0",
"Content-Type": "application/offset+octet-stream",
"Upload-Offset": "5",
"Content-Length": "3",
},