Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
shtukas committed Dec 9, 2024
1 parent 1fbf64d commit fb85a2f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions handlers/ticket-tailor-webhook/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ beforeEach(() => {

test('calls create guest account for new email addresses', async () => {
jest.useFakeTimers().setSystemTime(new Date(validEpochSeconds * 1000)); //Date works in Epoch milli
fetchMock.mock(
fetchMock.route(
`https://idapi.code.dev-theguardian.com/user/type/${emailAddress}`,
new Response(JSON.stringify({ userType: 'new' })),
);

fetchMock.mock(
fetchMock.route(
'https://idapi.code.dev-theguardian.com/guest?accountVerificationEmail=true',
{
url: 'https://idapi.code.dev-theguardian.com/guest?accountVerificationEmail=true',
body: { primaryEmailAddress: emailAddress },
method: 'POST',
status: 200
},
200,
);

await handler(sqsEvent);
Expand Down

0 comments on commit fb85a2f

Please sign in to comment.