Files
odoo_source/addons/mail_bot/static/tests/helpers/mock_server.js
T
2021-04-19 13:33:35 +00:00

34 lines
972 B
JavaScript

/** @odoo-module **/
import MockServer from '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"
},
});