Skip to content

Commit

Permalink
fix: make mocks more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
mrclickbits committed Jul 28, 2023
1 parent 1d80925 commit 1fd9177
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/models/workTimes.mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,18 @@ const createChangeRequest = ({
count: faker.datatype.number({ min: 1, max: 4 }),
date,
});
const isoDate = isoDateFromDateTime(date);

return {
id,
date: isoDateFromDateTime(date),
date: isoDate,
usersId: 0,
changes,
...(status === WorkTimeChangeRequestStatus.Declined
? {
status: WorkTimeChangeRequestStatus.Declined,
declinedAt: "2023-01-01",
declinedBy: faker.datatype.number(),
declinedAt: isoDate,
declinedBy: 0,
}
: {
status: WorkTimeChangeRequestStatus.Requested,
Expand Down

0 comments on commit 1fd9177

Please sign in to comment.