fix(backend/URLPreviewService): エラーでHTTP 422を出すように (#10339)
* fix(backend/URLPreviewService): エラーでHTTP 402を出すように * fix import
This commit is contained in:

committed by
GitHub

parent
2e051c5871
commit
e542a030e4
@@ -841,4 +841,12 @@ describe('Endpoints', () => {
|
||||
assert.strictEqual(res.body[0].id, carolPost.id);
|
||||
});
|
||||
});
|
||||
|
||||
describe('URL preview', () => {
|
||||
test('Error from summaly becomes HTTP 422', async () => {
|
||||
const res = await simpleGet('/url?url=https://e:xample.com');
|
||||
assert.strictEqual(res.status, 422);
|
||||
assert.strictEqual(res.body.error.code, 'URL_PREVIEW_FAILED');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user