Skip to content

Commit b20e86f

Browse files
committed
add back the 403 test
1 parent 4f78ff4 commit b20e86f

File tree

2 files changed

+33
-33
lines changed

2 files changed

+33
-33
lines changed

tests/live/mobileWallet.test.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ import { expect, test, describe } from "vitest";
33
const baseEndpoint = `https://core.aws.qa.acmuiuc.org`;
44

55
describe("Mobile pass issuance", async () => {
6-
// test(
7-
// "Test that passes will not be issued for non-members",
8-
// { timeout: 10000 },
9-
// async () => {
10-
// const response = await fetch(
11-
// `${baseEndpoint}/api/v1/mobileWallet/[email protected]`,
12-
// { method: "POST" },
13-
// );
14-
// expect(response.status).toBe(403);
15-
// },
16-
// );
6+
test(
7+
"Test that passes will not be issued for non-members",
8+
{ timeout: 10000 },
9+
async () => {
10+
const response = await fetch(
11+
`${baseEndpoint}/api/v1/mobileWallet/[email protected]`,
12+
{ method: "POST" },
13+
);
14+
expect(response.status).toBe(403);
15+
},
16+
);
1717
test(
1818
"Test that passes will be issued for members",
1919
{ timeout: 10000 },

tests/live/stripe.test.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,28 @@ const baseEndpoint = `https://core.aws.qa.acmuiuc.org`;
55

66
describe("Stripe live API authentication", async () => {
77
const token = await createJwt();
8-
// test(
9-
// "Test that auth is present on the GET route",
10-
// { timeout: 10000 },
11-
// async () => {
12-
// const response = await fetch(
13-
// `${baseEndpoint}/api/v1/stripe/paymentLinks`,
14-
// { method: "GET" },
15-
// );
16-
// expect(response.status).toBe(403);
17-
// },
18-
// );
19-
// test(
20-
// "Test that auth is present on the POST route",
21-
// { timeout: 10000 },
22-
// async () => {
23-
// const response = await fetch(
24-
// `${baseEndpoint}/api/v1/stripe/paymentLinks`,
25-
// { method: "POST" },
26-
// );
27-
// expect(response.status).toBe(403);
28-
// },
29-
// );
8+
test(
9+
"Test that auth is present on the GET route",
10+
{ timeout: 10000 },
11+
async () => {
12+
const response = await fetch(
13+
`${baseEndpoint}/api/v1/stripe/paymentLinks`,
14+
{ method: "GET" },
15+
);
16+
expect(response.status).toBe(403);
17+
},
18+
);
19+
test(
20+
"Test that auth is present on the POST route",
21+
{ timeout: 10000 },
22+
async () => {
23+
const response = await fetch(
24+
`${baseEndpoint}/api/v1/stripe/paymentLinks`,
25+
{ method: "POST" },
26+
);
27+
expect(response.status).toBe(403);
28+
},
29+
);
3030
test(
3131
"Test that getting existing links succeeds",
3232
{ timeout: 10000 },

0 commit comments

Comments
 (0)