From 43d9c7a0cf286c966a213ca406d878856c1afacd Mon Sep 17 00:00:00 2001 From: Matthew Petro Date: Sat, 10 Feb 2024 14:09:09 -0700 Subject: [PATCH] Minor improvements --- src/irrigation-events/irrigation-events.service.spec.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/irrigation-events/irrigation-events.service.spec.ts b/src/irrigation-events/irrigation-events.service.spec.ts index b781294..b082679 100644 --- a/src/irrigation-events/irrigation-events.service.spec.ts +++ b/src/irrigation-events/irrigation-events.service.spec.ts @@ -17,7 +17,6 @@ jest.mock('nano', () => { use: jest.fn().mockReturnValue({ get: mockGet, insert: mockInsert, - // Add other methods as needed }), }, } @@ -61,9 +60,9 @@ describe('IrrigationEventsService', () => { } const mockDocument: IrrigationEventDocument = { _id: expect.stringMatching(iso8601Regex), - deviceName: 'Display Name Field', - state: DeviceState.ON, - deviceId: 42, + deviceName: mockIrrigationEvent.displayName, + state: mockIrrigationEvent.value, + deviceId: mockIrrigationEvent.deviceId, } await service.insertIrrigationEvent(mockIrrigationEvent) expect(mockInsert).toHaveBeenCalledWith(mockDocument)