From 96e732f6bbc7622d50c3a969f5c2bb44c85c2b48 Mon Sep 17 00:00:00 2001
From: tsm-odoo <tsm@odoo.com>
Date: Mon, 21 Mar 2022 12:59:54 +0000
Subject: [PATCH] [FIX] mail: fix mock server mail channel write
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Mock server's mail channel write method is incorrect. It assumes
the id of the channel will always be 20 while it could be anything.

closes odoo/odoo#86770

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
---
 addons/mail/static/tests/helpers/mock_server.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/addons/mail/static/tests/helpers/mock_server.js b/addons/mail/static/tests/helpers/mock_server.js
index 741b25bffc84..f8f7e62fcf9c 100644
--- a/addons/mail/static/tests/helpers/mock_server.js
+++ b/addons/mail/static/tests/helpers/mock_server.js
@@ -1117,7 +1117,7 @@ MockServer.include({
         this._widget.call('bus_service', 'trigger', 'notification', [{
             type: 'mail.channel/insert',
             payload: {
-                id: 20,
+                id,
                 avatarCacheKey: avatarCacheKey,
             },
         }]);
-- 
GitLab