summaryrefslogtreecommitdiff
path: root/addons/mail/static/tests/document_viewer_tests.js
diff options
context:
space:
mode:
authorThanh Dodeur <tso@odoo.com>2019-08-28 07:48:57 +0000
committerAlexandre Kühn <aku@odoo.com>2019-10-02 21:30:17 +0000
commit7e0ed840d6a17f050a3c99e8286a8124eaf8a4dc (patch)
tree9936403ad2c76a362170037ddd8d45978c01df25 /addons/mail/static/tests/document_viewer_tests.js
parenta5251e1d40d9bd833993bf1618fc2760adb6567a (diff)
[FIX] mail: fixes src for text files in the document viewer
Before this commit, the url for the src of the iFrame used to display text files in the document viewer wasn't properly set, resulting in the `model` argument to be invalid. This commit fixes this issue. Task-Id 2058588 closes odoo/odoo#36160 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/tests/document_viewer_tests.js')
-rw-r--r--addons/mail/static/tests/document_viewer_tests.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/mail/static/tests/document_viewer_tests.js b/addons/mail/static/tests/document_viewer_tests.js
index 404a6f267aa..4d914347669 100644
--- a/addons/mail/static/tests/document_viewer_tests.js
+++ b/addons/mail/static/tests/document_viewer_tests.js
@@ -25,7 +25,7 @@ var createViewer = function (params) {
if (route === 'https://www.youtube.com/embed/FYqW0Gdwbzk') {
return Promise.resolve();
}
- if (route === '/web/content/4?model%3Dir.attachment') {
+ if (route === '/web/content/4?model=ir.attachment') {
return Promise.resolve();
}
if (route === '/web/image/6?unique=1&signature=999&model=ir.attachment') {
@@ -134,7 +134,7 @@ QUnit.module('DocumentViewer', {
assert.strictEqual(viewer.$(".o_image_caption:contains('text.html')").length, 1,
"the viewer be on the right attachment");
- assert.containsOnce(viewer, 'iframe[data-src="/web/content/4?model%3Dir.attachment"]',
+ assert.containsOnce(viewer, 'iframe[data-src="/web/content/4?model=ir.attachment"]',
"there should be an iframe with the right src");
viewer.destroy();