We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f80c506 commit 235dbe2Copy full SHA for 235dbe2
apps/marketing/src/middleware/redirects/corporate/__tests__/index.test.ts
@@ -62,6 +62,16 @@ describe('getRedirects', () => {
62
);
63
});
64
65
+ it('redirects /certificates/:session_id to studio.code.org/api/hour/certificates/:session_id', () => {
66
+ const sessionID = '_1_537adb90bcf397109ef4358f4c66c493';
67
+ const req = createMockRequest(`/certificates/${sessionID}`);
68
+ getRedirects(req);
69
+ expect(getCachedRedirectResponse).toHaveBeenCalledWith(
70
+ new URL(`/api/hour/certificates/${sessionID}`, 'https://studio.code.org'),
71
+ {status: 308},
72
+ );
73
+ });
74
+
75
it('returns undefined for unrelated paths', () => {
76
const req = createMockRequest('/other/path');
77
const result = getRedirects(req);
0 commit comments