mirror of
https://github.com/vernu/textbee.git
synced 2026-04-17 21:40:12 -04:00
test(api): fix failing tests
This commit is contained in:
@@ -180,7 +180,14 @@ describe('GatewayService', () => {
|
||||
})
|
||||
expect(service.updateDevice).toHaveBeenCalledWith(
|
||||
mockDevice._id.toString(),
|
||||
{ ...mockDeviceInput, enabled: true, user: mockUser }
|
||||
expect.objectContaining({
|
||||
...mockDeviceInput,
|
||||
enabled: true,
|
||||
user: mockUser,
|
||||
fcmTokenUpdatedAt: expect.any(Date),
|
||||
fcmTokenInvalidatedAt: undefined,
|
||||
fcmTokenInvalidReason: undefined,
|
||||
}),
|
||||
)
|
||||
expect(result).toBeDefined()
|
||||
|
||||
@@ -202,6 +209,9 @@ describe('GatewayService', () => {
|
||||
expect(mockDeviceModel.create).toHaveBeenCalledWith({
|
||||
...mockDeviceInput,
|
||||
user: mockUser,
|
||||
fcmTokenUpdatedAt: expect.any(Date),
|
||||
fcmTokenInvalidatedAt: undefined,
|
||||
fcmTokenInvalidReason: undefined,
|
||||
})
|
||||
expect(result).toBeDefined()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user