Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewpetro committed Feb 10, 2024
1 parent 0bfa06a commit 43d9c7a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/irrigation-events/irrigation-events.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jest.mock('nano', () => {
use: jest.fn().mockReturnValue({
get: mockGet,
insert: mockInsert,
// Add other methods as needed
}),
},
}
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 43d9c7a

Please sign in to comment.