From bf97152ce99f84a524ed8773280b4bba8fca38da Mon Sep 17 00:00:00 2001 From: Thanh Dodeur Date: Thu, 26 Mar 2020 09:11:30 +0000 Subject: [REF] mail: removes signature from route params MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit removes the unnecessary usage of `signature` instead of `unique` in the route params for `web/image`. closes odoo/odoo#48437 Related: odoo/enterprise#9501 Signed-off-by: Jérémy Kersten (jke) --- addons/mail/static/tests/document_viewer_tests.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'addons/mail/static/tests/document_viewer_tests.js') diff --git a/addons/mail/static/tests/document_viewer_tests.js b/addons/mail/static/tests/document_viewer_tests.js index 4d914347669..5ccb9df5ff3 100644 --- a/addons/mail/static/tests/document_viewer_tests.js +++ b/addons/mail/static/tests/document_viewer_tests.js @@ -28,7 +28,7 @@ var createViewer = function (params) { if (route === '/web/content/4?model=ir.attachment') { return Promise.resolve(); } - if (route === '/web/image/6?unique=1&signature=999&model=ir.attachment') { + if (route === '/web/image/6?unique=56789abc&model=ir.attachment') { return Promise.resolve(); } }; @@ -70,7 +70,7 @@ QUnit.module('DocumentViewer', { {id: 3, name: 'urlRandom', type: 'url', mimetype: '', url: 'https://www.google.com'}, {id: 4, name: 'text.html', type: 'binary', mimetype: 'text/html', datas:'testee'}, {id: 5, name: 'video.mp4', type: 'binary', mimetype: 'video/mp4', datas:'R0lDOP////ywAADs='}, - {id: 6, name: 'image.jpg', type: 'binary', mimetype: 'image/jpeg', checksum: 999, datas:'R0lVOP////ywAADs='}, + {id: 6, name: 'image.jpg', type: 'binary', mimetype: 'image/jpeg', checksum: '123456789abc', datas:'R0lVOP////ywAADs='}, ]; }, }, function () { @@ -166,7 +166,7 @@ QUnit.module('DocumentViewer', { assert.strictEqual(viewer.$(".o_image_caption:contains('image.jpg')").length, 1, "the viewer be on the right attachment"); - assert.containsOnce(viewer, 'img[data-src="/web/image/6?unique=1&signature=999&model=ir.attachment"]', + assert.containsOnce(viewer, 'img[data-src="/web/image/6?unique=56789abc&model=ir.attachment"]', "there should be a video player"); viewer.destroy(); -- cgit v1.2.3