Skip to content

Commit

Permalink
Update + Add unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle1morel committed May 8, 2024
1 parent 124850f commit 58babb3
Show file tree
Hide file tree
Showing 5 changed files with 287 additions and 89 deletions.
4 changes: 2 additions & 2 deletions app/src/controllers/submission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ const controller = {
activityId: newActivityId,
trackingId: x.trackingId,
status: x.status,
statusLastVerified: '2024-05-03T07:00:00.000Z'
statusLastVerified: x.statusLastVerified
}));
}

Expand All @@ -254,7 +254,7 @@ const controller = {
permitTypeId: x.permitTypeId,
activityId: newActivityId,
needed: PERMIT_NEEDED.UNDER_INVESTIGATION,
statusLastVerified: '2024-05-03T07:00:00.000Z'
statusLastVerified: x.statusLastVerified
}));
}

Expand Down
12 changes: 8 additions & 4 deletions app/tests/unit/controllers/permit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ describe('createPermit', () => {
needed: 'true',
status: 'FOO',
submittedDate: now.toISOString(),
adjudicationDate: now.toISOString()
adjudicationDate: now.toISOString(),
statusLastVerified: now.toISOString()
};

createSpy.mockResolvedValue(created);
Expand Down Expand Up @@ -144,7 +145,8 @@ describe('deletePermit', () => {
needed: 'true',
status: 'FOO',
submittedDate: now.toISOString(),
adjudicationDate: now.toISOString()
adjudicationDate: now.toISOString(),
statusLastVerified: now.toISOString()
};

deleteSpy.mockResolvedValue(deleted);
Expand Down Expand Up @@ -261,7 +263,8 @@ describe('listPermits', () => {
needed: 'true',
status: 'FOO',
submittedDate: now.toISOString(),
adjudicationDate: now.toISOString()
adjudicationDate: now.toISOString(),
statusLastVerified: now.toISOString()
}
];

Expand Down Expand Up @@ -335,7 +338,8 @@ describe('updatePermit', () => {
needed: 'true',
status: 'FOO',
submittedDate: now.toISOString(),
adjudicationDate: now.toISOString()
adjudicationDate: now.toISOString(),
statusLastVerified: now.toISOString()
};

updateSpy.mockResolvedValue(updated);
Expand Down
Loading

0 comments on commit 58babb3

Please sign in to comment.