From e1344467f2301c122f8ce00b2ddf29db92bc90d2 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 6 Sep 2015 11:10:23 +0100 Subject: Make fallback content types case-insensitive --- tests/docx/content-types-reader.tests.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/docx/content-types-reader.tests.js b/tests/docx/content-types-reader.tests.js index 3390e43..a223d09 100644 --- a/tests/docx/content-types-reader.tests.js +++ b/tests/docx/content-types-reader.tests.js @@ -37,4 +37,11 @@ describe('readContentTypesFromXml', function() { assert.equal(contentTypes.findContentType("word/media/hat.tif"), "image/tiff"); assert.equal(contentTypes.findContentType("word/media/hat.tiff"), "image/tiff"); }); + + test('fallback content types are case insensitive on extension', function() { + var contentTypes = readContentTypesFromXml({ + root: new XmlElement("content-types:Types", {}, []) + }); + assert.equal(contentTypes.findContentType("word/media/hat.PnG"), "image/png"); + }); }); -- cgit v1.2.3