summaryrefslogtreecommitdiff
path: root/addons/mail/static/tests/document_viewer_tests.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/mail/static/tests/document_viewer_tests.js')
-rw-r--r--addons/mail/static/tests/document_viewer_tests.js19
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 87fa2dbed94..b7ba9763386 100644
--- a/addons/mail/static/tests/document_viewer_tests.js
+++ b/addons/mail/static/tests/document_viewer_tests.js
@@ -206,5 +206,24 @@ QUnit.module('DocumentViewer', {
assert.ok(viewer.isDestroyed(), 'viewer should be destroyed');
});
+
+ QUnit.test('fileType and integrity test', function (assert) {
+ assert.expect(3);
+
+ var viewer = 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();
+ });
+
});
});