summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/core/widget_tests.js
diff options
context:
space:
mode:
authorAlexandre Kühn <aku@odoo.com>2018-09-14 16:50:45 +0200
committerAlexandre Kühn <aku@odoo.com>2018-09-14 17:14:33 +0200
commit45d197c2087e61e702f288f76ccbf99bdd9b235d (patch)
tree2206c415966338f9c1d7eac51b76c641bc7ad4bd /addons/web/static/tests/core/widget_tests.js
parent9393a0eba88cad6184b5255a11f6a5a2996528cc (diff)
[FIX] web: tests: adapt JS tests from forward-port 9c77066f345360429a0920ca4d17af1f84a7ebea
The test was failing because it was using an old approach to mock services in JS tests. Also, it provides ajax service in the list of services, which was not supported in a mocked environment. With this commit, when an ajax service is provided in the test, it will use this service instead of using mocked RPCs from the mocked server.
Diffstat (limited to 'addons/web/static/tests/core/widget_tests.js')
-rw-r--r--addons/web/static/tests/core/widget_tests.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/web/static/tests/core/widget_tests.js b/addons/web/static/tests/core/widget_tests.js
index 9510079e380..f61d4a18f9b 100644
--- a/addons/web/static/tests/core/widget_tests.js
+++ b/addons/web/static/tests/core/widget_tests.js
@@ -391,7 +391,9 @@ QUnit.module('core', {}, function () {
return def;
},
},
- services: [AjaxService],
+ services: {
+ ajax: AjaxService
+ },
});
var widget = new Widget(parent);