aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-09-06 11:10:23 +0100
committerMichael Williamson <mike@zwobble.org>2015-09-06 11:10:23 +0100
commite1344467f2301c122f8ce00b2ddf29db92bc90d2 (patch)
tree012c7dbf82e2200fb6051ed5330b7349e6d21058 /tests
parentd4a14afabc917a06cd3ac67ccb03c69bf0299821 (diff)
Make fallback content types case-insensitive
Diffstat (limited to 'tests')
-rw-r--r--tests/docx/content-types-reader.tests.js7
1 files changed, 7 insertions, 0 deletions
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");
+ });
});