diff options
Diffstat (limited to 'workhorse/internal/senddata/contentprocessor/contentprocessor_test.go')
-rw-r--r-- | workhorse/internal/senddata/contentprocessor/contentprocessor_test.go | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/workhorse/internal/senddata/contentprocessor/contentprocessor_test.go b/workhorse/internal/senddata/contentprocessor/contentprocessor_test.go index ce7f7921589..b04263de6b9 100644 --- a/workhorse/internal/senddata/contentprocessor/contentprocessor_test.go +++ b/workhorse/internal/senddata/contentprocessor/contentprocessor_test.go @@ -86,7 +86,7 @@ func TestSetProperContentTypeAndDisposition(t *testing.T) { }, { desc: "Application type", - contentType: "application/pdf", + contentType: "application/octet-stream", contentDisposition: "attachment", body: testhelper.LoadFile(t, "testdata/file.pdf"), }, @@ -110,7 +110,7 @@ func TestSetProperContentTypeAndDisposition(t *testing.T) { }, { desc: "Audio type", - contentType: "audio/mpeg", + contentType: "application/octet-stream", contentDisposition: "attachment", body: testhelper.LoadFile(t, "testdata/audio.mp3"), }, @@ -152,16 +152,22 @@ func TestSetProperContentTypeAndDisposition(t *testing.T) { }, { desc: "Sketch file", - contentType: "application/zip", + contentType: "application/octet-stream", contentDisposition: "attachment", body: testhelper.LoadFile(t, "testdata/file.sketch"), }, { desc: "PDF file with non-ASCII characters in filename", - contentType: "application/pdf", + contentType: "application/octet-stream", contentDisposition: `attachment; filename="file-ä.pdf"; filename*=UTF-8''file-%c3.pdf`, body: testhelper.LoadFile(t, "testdata/file-ä.pdf"), }, + { + desc: "Microsoft Word file", + contentType: "application/octet-stream", + contentDisposition: `attachment`, + body: testhelper.LoadFile(t, "testdata/file.docx"), + }, } for _, tc := range testCases { |