From 3b3f6cc0694b95cfbb0300cbff9aa6d9a3a6fe7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Tue, 24 Apr 2018 14:37:14 +0200 Subject: [PATCH] [FIX] mail: update test broken by forward port The _mockMessageFetch method was changed in the mockserver in saas11.2. The forward port then obviously broke this test, which depended on the fact that it returns an empty list. --- addons/mail/static/tests/systray_tests.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/mail/static/tests/systray_tests.js b/addons/mail/static/tests/systray_tests.js index cdaec82a3a6..b6161453d33 100644 --- a/addons/mail/static/tests/systray_tests.js +++ b/addons/mail/static/tests/systray_tests.js @@ -221,6 +221,12 @@ QUnit.test('messaging menu widget: menu with no records', function (assert) { var messagingMenu = new systray.MessagingMenu(); testUtils.addMockEnvironment(messagingMenu, { services: this.services, + mockRPC: function (route, args) { + if (args.method === 'message_fetch') { + return $.when([]); + } + return this._super.apply(this, arguments); + } }); messagingMenu.appendTo($('#qunit-fixture')); messagingMenu.$('.dropdown-toggle').click();