Skip to content

Commit

Permalink
merge corrections.
Browse files Browse the repository at this point in the history
  • Loading branch information
devinleighsmith committed Jun 27, 2023
1 parent de87970 commit 6ea7ec8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ describe('Update lease container component', () => {
await setup({});

mockAxios.onPut().reply(200, {});
await act(async () => viewProps.onSubmit({ ...getDefaultFormLease(), purposeTypeCode: 'BCFERRIES' }));
await act(async () =>
viewProps.onSubmit({ ...getDefaultFormLease(), purposeTypeCode: 'BCFERRIES' }),
);

expect(JSON.parse(mockAxios.history.put[0].data)).toEqual(leaseData);
});
Expand All @@ -92,7 +94,9 @@ describe('Update lease container component', () => {
await setup({});

mockAxios.onPut().reply(409, { error: 'test message' });
await act(async () => viewProps.onSubmit({ ...getDefaultFormLease(), purposeTypeCode: 'BCFERRIES' }));
await act(async () =>
viewProps.onSubmit({ ...getDefaultFormLease(), purposeTypeCode: 'BCFERRIES' }),
);

expect(JSON.parse(mockAxios.history.put[0].data)).toEqual(leaseData);
});
Expand All @@ -104,7 +108,9 @@ describe('Update lease container component', () => {
error: 'test message',
errorCode: UserOverrideCode.PROPERTY_OF_INTEREST_TO_INVENTORY,
});
await act(async () => viewProps.onSubmit({ ...getDefaultFormLease(), purposeTypeCode: 'BCFERRIES' }));
await act(async () =>
viewProps.onSubmit({ ...getDefaultFormLease(), purposeTypeCode: 'BCFERRIES' }),
);
const button = await screen.findByText('Acknowledge & Continue');
await act(async () => userEvent.click(button));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ exports[`Update lease container component renders as expected 1`] = `
class="Toastify"
/>
<div />
autocomplete="off"
</DocumentFragment>
`;

0 comments on commit 6ea7ec8

Please sign in to comment.