diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-04-05 18:46:10 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-04-05 18:46:10 +0200 |
| commit | 3f95b074e959f0f4ac93fbf4048c0c7276f2c17a (patch) | |
| tree | f4e793da5d83bcd1bd4347f71cb3f45cbc953df3 /addons/mail/static/tests/document_viewer_tests.js | |
| parent | 1a871d72438c731d08ef10e668b81b4ade900b85 (diff) | |
| parent | f2be461f0906ed47306da58c31240014b6239d80 (diff) | |
[MERGE] forward port branch saas-12.2 up to f2be461f090
Diffstat (limited to 'addons/mail/static/tests/document_viewer_tests.js')
| -rw-r--r-- | addons/mail/static/tests/document_viewer_tests.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/addons/mail/static/tests/document_viewer_tests.js b/addons/mail/static/tests/document_viewer_tests.js index 5d3dcf7069f..b5748ab72ee 100644 --- a/addons/mail/static/tests/document_viewer_tests.js +++ b/addons/mail/static/tests/document_viewer_tests.js @@ -207,5 +207,24 @@ QUnit.module('DocumentViewer', { assert.ok(viewer.isDestroyed(), 'viewer should be destroyed'); }); + + QUnit.test('fileType and integrity test', async function (assert) { + assert.expect(3); + + var viewer = await createViewer({ + attachmentID: 2, + attachments: this.attachments, + }); + + assert.strictEqual(this.attachments[1].type, 'url', + "the type should be url"); + assert.strictEqual(this.attachments[1].fileType, 'youtu', + "there should be a fileType 'youtu'"); + assert.strictEqual(this.attachments[1].youtube, 'FYqW0Gdwbzk', + "there should be a youtube token"); + + viewer.destroy(); + }); + }); }); |
