summaryrefslogtreecommitdiff
path: root/addons/mail/static/tests/models
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2020-06-05 09:18:14 +0000
committerAaron Bohy <aab@odoo.com>2020-06-12 09:47:48 +0000
commitb4ba0fc34082deec8ca6c871ce7a203c0a3a61a4 (patch)
tree27451423f32b218e699d3135c398d338b249c5cd /addons/mail/static/tests/models
parentdc260c324170a90fa737cd21dd528e39d658d9b6 (diff)
[FIX] *: adapt tests to env rework
This commit adapts tests following recent changes on the helpers. The main change is that addMockEnvironment (and all functions using it) are now async, as they need to wait for services to be started.
Diffstat (limited to 'addons/mail/static/tests/models')
-rw-r--r--addons/mail/static/tests/models/cc_throttle_function_tests.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/mail/static/tests/models/cc_throttle_function_tests.js b/addons/mail/static/tests/models/cc_throttle_function_tests.js
index 5ab00ef6048..f760675b1f3 100644
--- a/addons/mail/static/tests/models/cc_throttle_function_tests.js
+++ b/addons/mail/static/tests/models/cc_throttle_function_tests.js
@@ -31,7 +31,7 @@ QUnit.module('mail', {
QUnit.module('model', {}, function () {
QUnit.module('CC Throttle Function');
-QUnit.test('cancel()', function (assert) {
+QUnit.test('cancel()', async function (assert) {
var done = assert.async();
assert.expect(3);
@@ -39,7 +39,7 @@ QUnit.test('cancel()', function (assert) {
var def = testUtils.makeTestPromise();
var step = 1;
- var widget = testUtils.createParent({
+ var widget = await testUtils.createParent({
mockRPC: function (route, args) {
if (args.method === '__rpc__') {
assert.step(args.method + args.args[0]);
@@ -87,7 +87,7 @@ QUnit.test('cancel()', function (assert) {
});
});
-QUnit.test('clear()', function (assert) {
+QUnit.test('clear()', async function (assert) {
var done = assert.async();
assert.expect(5);
@@ -96,7 +96,7 @@ QUnit.test('clear()', function (assert) {
var def2 = testUtils.makeTestPromise();
var step = 1;
- var widget = testUtils.createParent({
+ var widget = await testUtils.createParent({
mockRPC: function (route, args) {
if (args.method === '__rpc__') {
assert.step(args.method + args.args[0]);