From 7898128700f4c2a51e41bd82a8a7d596e95b622e Mon Sep 17 00:00:00 2001 From: Naren Venkataraman Date: Wed, 4 Nov 2015 04:56:32 -0500 Subject: [PATCH] Fix tests --- handler_test.go | 1 + patch_test.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/handler_test.go b/handler_test.go index 818d2bf..c1cb07b 100644 --- a/handler_test.go +++ b/handler_test.go @@ -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"), diff --git a/patch_test.go b/patch_test.go index e67d859..f7268cd 100644 --- a/patch_test.go +++ b/patch_test.go @@ -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", },