diff options
| author | Liam Z <sethverlo5@gmail.com> | 2016-10-02 19:49:56 +0800 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-10-02 12:49:56 +0100 |
| commit | 514226e8c04ca483adff18bbad3a66f9b1593f07 (patch) | |
| tree | 0f468277a7135dca45227e0576c4508a4cf07fe4 /test | |
| parent | 3eb1a5207b39b6150d828867cc684e5da94482f6 (diff) | |
Ignore v:imagedata elements without relationship ID with warning
Diffstat (limited to 'test')
| -rw-r--r-- | test/docx/body-reader.tests.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/docx/body-reader.tests.js b/test/docx/body-reader.tests.js index 878d279..62178ec 100644 --- a/test/docx/body-reader.tests.js +++ b/test/docx/body-reader.tests.js @@ -454,6 +454,15 @@ test("can read imagedata elements with r:id attribute", function() { }))); }); +test("when v:imagedata element has no relationship ID then it is ignored with warning", function() { + var imagedataElement = new XmlElement("v:imagedata"); + + var result = readXmlElement(imagedataElement); + + assert.deepEqual(result.value, []); + assert.deepEqual(result.messages, [warning("A v:imagedata element without a relationship ID was ignored")]); +}); + test("can read inline pictures", function() { var drawing = createInlineImage({ blip: createEmbeddedBlip(IMAGE_RELATIONSHIP_ID), |
