forked from mtusi2026/mtusi2026lab4
lab4: evidence, REPORT.md, форматирование
This commit is contained in:
@@ -314,9 +314,12 @@ describe('attachments (proxy upload)', () => {
|
||||
it('serves unknown content variants as errors, not bytes', async () => {
|
||||
const created = await ready(png);
|
||||
const variant = (name: string) =>
|
||||
http<ApiErrorBody>(`/api/v1/attachments/${created.id}/content?variant=${name}`, {
|
||||
headers: bearer(alice.token),
|
||||
});
|
||||
http<ApiErrorBody>(
|
||||
`/api/v1/attachments/${created.id}/content?variant=${name}`,
|
||||
{
|
||||
headers: bearer(alice.token),
|
||||
},
|
||||
);
|
||||
expect((await variant('original')).response.status).toBe(200);
|
||||
expectError(await variant('thumbnail'), 404, 'not_found');
|
||||
expectError(await variant('bogus'), 400, 'invalid_request');
|
||||
|
||||
Reference in New Issue
Block a user