Skip to content

Commit 6080afb

Browse files
committed
add one more live test
1 parent 53496a8 commit 6080afb

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/api/routes/mobileWallet.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@ const mobileWalletRoute: FastifyPluginAsync = async (fastify, _options) => {
7474
`membership@${fastify.environmentConfig.EmailDomain}`,
7575
item,
7676
);
77+
if (
78+
fastify.runEnvironment === "dev" &&
79+
request.query.email === "[email protected]"
80+
) {
81+
return reply
82+
.status(202)
83+
.send({ message: "OK (skipped sending email)" });
84+
}
7785
await fastify.sesClient.send(emailCommand);
7886
reply.status(202).send({ message: "OK" });
7987
},

tests/live/mobileWallet.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,10 @@ describe("Mobile pass issuance", async () => {
99
);
1010
expect(response.status).toBe(403);
1111
});
12+
test("Test that passes will be issued for members", async () => {
13+
const response = await fetch(
14+
`${baseEndpoint}/api/v1/mobileWallet/[email protected]`,
15+
);
16+
expect(response.status).toBe(202);
17+
});
1218
});

0 commit comments

Comments
 (0)