Fix tests
This commit is contained in:
parent
db67b862ae
commit
7898128700
|
@ -117,6 +117,7 @@ func TestMethodOverride(t *testing.T) {
|
||||||
ReqHeader: map[string]string{
|
ReqHeader: map[string]string{
|
||||||
"Tus-Resumable": "1.0.0",
|
"Tus-Resumable": "1.0.0",
|
||||||
"Upload-Offset": "5",
|
"Upload-Offset": "5",
|
||||||
|
"Content-Type": "application/offset+octet-stream",
|
||||||
"X-HTTP-Method-Override": "PATCH",
|
"X-HTTP-Method-Override": "PATCH",
|
||||||
},
|
},
|
||||||
ReqBody: strings.NewReader("hello"),
|
ReqBody: strings.NewReader("hello"),
|
||||||
|
|
|
@ -62,6 +62,7 @@ func TestPatch(t *testing.T) {
|
||||||
URL: "yes",
|
URL: "yes",
|
||||||
ReqHeader: map[string]string{
|
ReqHeader: map[string]string{
|
||||||
"Tus-Resumable": "1.0.0",
|
"Tus-Resumable": "1.0.0",
|
||||||
|
"Content-Type": "application/offset+octet-stream",
|
||||||
"Upload-Offset": "5",
|
"Upload-Offset": "5",
|
||||||
},
|
},
|
||||||
ReqBody: strings.NewReader("hello"),
|
ReqBody: strings.NewReader("hello"),
|
||||||
|
@ -77,6 +78,7 @@ func TestPatch(t *testing.T) {
|
||||||
URL: "no",
|
URL: "no",
|
||||||
ReqHeader: map[string]string{
|
ReqHeader: map[string]string{
|
||||||
"Tus-Resumable": "1.0.0",
|
"Tus-Resumable": "1.0.0",
|
||||||
|
"Content-Type": "application/offset+octet-stream",
|
||||||
"Upload-Offset": "5",
|
"Upload-Offset": "5",
|
||||||
},
|
},
|
||||||
Code: http.StatusNotFound,
|
Code: http.StatusNotFound,
|
||||||
|
@ -88,6 +90,7 @@ func TestPatch(t *testing.T) {
|
||||||
URL: "yes",
|
URL: "yes",
|
||||||
ReqHeader: map[string]string{
|
ReqHeader: map[string]string{
|
||||||
"Tus-Resumable": "1.0.0",
|
"Tus-Resumable": "1.0.0",
|
||||||
|
"Content-Type": "application/offset+octet-stream",
|
||||||
"Upload-Offset": "4",
|
"Upload-Offset": "4",
|
||||||
},
|
},
|
||||||
Code: http.StatusConflict,
|
Code: http.StatusConflict,
|
||||||
|
@ -99,6 +102,7 @@ func TestPatch(t *testing.T) {
|
||||||
URL: "yes",
|
URL: "yes",
|
||||||
ReqHeader: map[string]string{
|
ReqHeader: map[string]string{
|
||||||
"Tus-Resumable": "1.0.0",
|
"Tus-Resumable": "1.0.0",
|
||||||
|
"Content-Type": "application/offset+octet-stream",
|
||||||
"Upload-Offset": "5",
|
"Upload-Offset": "5",
|
||||||
},
|
},
|
||||||
ReqBody: strings.NewReader("hellothisismorethan15bytes"),
|
ReqBody: strings.NewReader("hellothisismorethan15bytes"),
|
||||||
|
@ -194,6 +198,7 @@ func TestPatchOverflow(t *testing.T) {
|
||||||
URL: "yes",
|
URL: "yes",
|
||||||
ReqHeader: map[string]string{
|
ReqHeader: map[string]string{
|
||||||
"Tus-Resumable": "1.0.0",
|
"Tus-Resumable": "1.0.0",
|
||||||
|
"Content-Type": "application/offset+octet-stream",
|
||||||
"Upload-Offset": "5",
|
"Upload-Offset": "5",
|
||||||
"Content-Length": "3",
|
"Content-Length": "3",
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue