summaryrefslogtreecommitdiff
path: root/addons/mail_bot/static/tests
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/mail_bot/static/tests
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/mail_bot/static/tests')
-rw-r--r--addons/mail_bot/static/tests/helpers/mock_server.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/addons/mail_bot/static/tests/helpers/mock_server.js b/addons/mail_bot/static/tests/helpers/mock_server.js
new file mode 100644
index 00000000..63de6c99
--- /dev/null
+++ b/addons/mail_bot/static/tests/helpers/mock_server.js
@@ -0,0 +1,36 @@
+odoo.define('mail_bot/static/tests/helpers/mock_server.js', function (require) {
+"use strict";
+
+const MockServer = require('web.MockServer');
+
+MockServer.include({
+ //--------------------------------------------------------------------------
+ // Private
+ //--------------------------------------------------------------------------
+
+ /**
+ * @override
+ */
+ async _performRpc(route, args) {
+ if (args.model === 'mail.channel' && args.method === 'init_odoobot') {
+ return this._mockMailChannelInitOdooBot();
+ }
+ return this._super(...arguments);
+ },
+
+ //--------------------------------------------------------------------------
+ // Private Mocked Methods
+ //--------------------------------------------------------------------------
+
+ /**
+ * Simulates `init_odoobot` on `mail.channel`.
+ *
+ * @private
+ */
+ _mockMailChannelInitOdooBot() {
+ // TODO implement this mock task-2300480
+ // and improve test "OdooBot initialized after 2 minutes"
+ },
+});
+
+});