[FIX] bus,mail:tests: do not use deprecated test helpers
`testUtils.addMockEnvironment` is deprecated since https://github.com/odoo/odoo/commit/abf32b8b21394491040e5c11c1fea809c1d7c62c We should use `testUtils.mock.addMockEnvironment` instead.
This commit is contained in:
@@ -223,7 +223,7 @@ QUnit.module('Bus', {
|
||||
var pollDeferredMaster = $.Deferred();
|
||||
|
||||
var parentMaster = new Widget();
|
||||
testUtils.addMockEnvironment(parentMaster, {
|
||||
testUtils.mock.addMockEnvironment(parentMaster, {
|
||||
data: {},
|
||||
services: {
|
||||
bus_service: BusService,
|
||||
@@ -255,7 +255,7 @@ QUnit.module('Bus', {
|
||||
setTimeout(function () {
|
||||
var parentSlave = new Widget();
|
||||
var pollDeferredSlave = $.Deferred();
|
||||
testUtils.addMockEnvironment(parentSlave, {
|
||||
testUtils.mock.addMockEnvironment(parentSlave, {
|
||||
data: {},
|
||||
services: {
|
||||
bus_service: BusService,
|
||||
|
||||
@@ -592,7 +592,7 @@ QUnit.test("messaging menu widget: channel seen notification", function ( assert
|
||||
this.data.initMessaging.channel_slots.channel_channel[0].message_unread_counter = 1;
|
||||
|
||||
var messagingMenu = new MessagingMenu();
|
||||
testUtils.addMockEnvironment(messagingMenu, {
|
||||
testUtils.mock.addMockEnvironment(messagingMenu, {
|
||||
services: this.services,
|
||||
data: this.data,
|
||||
});
|
||||
@@ -633,7 +633,7 @@ QUnit.test("messaging menu widget: preview with no message should be undated", f
|
||||
this.data['mail.message'].records[0].channel_ids = [];
|
||||
|
||||
var messagingMenu = new MessagingMenu();
|
||||
testUtils.addMockEnvironment(messagingMenu, {
|
||||
testUtils.mock.addMockEnvironment(messagingMenu, {
|
||||
services: this.services,
|
||||
data: this.data,
|
||||
});
|
||||
@@ -664,7 +664,7 @@ QUnit.test("messaging menu widget: sort dated previews before undated previews",
|
||||
this.data.initMessaging.channel_slots.direct_message = [dm];
|
||||
|
||||
var messagingMenu = new MessagingMenu();
|
||||
testUtils.addMockEnvironment(messagingMenu, {
|
||||
testUtils.mock.addMockEnvironment(messagingMenu, {
|
||||
services: this.services,
|
||||
data: this.data,
|
||||
});
|
||||
@@ -752,7 +752,7 @@ QUnit.test('global counter with channel previews', function (assert) {
|
||||
this.data['mail.message'].records = messages;
|
||||
|
||||
var messagingMenu = new MessagingMenu();
|
||||
testUtils.addMockEnvironment(messagingMenu, {
|
||||
testUtils.mock.addMockEnvironment(messagingMenu, {
|
||||
services: this.services,
|
||||
data: this.data,
|
||||
session: {
|
||||
|
||||
Reference in New Issue
Block a user