Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
@@ -42,16 +42,16 @@ describe("registerToCalendars", () => {
|
||||
});
|
||||
|
||||
it("should log registration", () => {
|
||||
const consoleLogSpy = jest.spyOn(console, "log").mockImplementation();
|
||||
const consoleInfoSpy = jest.spyOn(console, "info").mockImplementation();
|
||||
const calendarURIs = ["/calendars/cal1", "/calendars/cal2"];
|
||||
|
||||
registerToCalendars(mockSocket, calendarURIs);
|
||||
|
||||
expect(consoleLogSpy).toHaveBeenCalledWith(
|
||||
expect(consoleInfoSpy).toHaveBeenCalledWith(
|
||||
"Registered to calendars",
|
||||
calendarURIs
|
||||
);
|
||||
|
||||
consoleLogSpy.mockRestore();
|
||||
consoleInfoSpy.mockRestore();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -43,16 +43,16 @@ describe("unregisterToCalendars", () => {
|
||||
});
|
||||
|
||||
it("should log unregistration", () => {
|
||||
const consoleLogSpy = jest.spyOn(console, "log").mockImplementation();
|
||||
const consoleInfoSpy = jest.spyOn(console, "info").mockImplementation();
|
||||
const calendarURIs = ["/calendars/cal1", "/calendars/cal2"];
|
||||
|
||||
unregisterToCalendars(mockSocket, calendarURIs);
|
||||
|
||||
expect(consoleLogSpy).toHaveBeenCalledWith(
|
||||
expect(consoleInfoSpy).toHaveBeenCalledWith(
|
||||
"Unregistered to calendars",
|
||||
calendarURIs
|
||||
);
|
||||
|
||||
consoleLogSpy.mockRestore();
|
||||
consoleInfoSpy.mockRestore();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user