fix test/e2e/endpoints.ts
This commit is contained in:
parent
e69e849e25
commit
8520917167
1 changed files with 5 additions and 1 deletions
|
|
@ -1045,10 +1045,14 @@ describe('Endpoints', () => {
|
||||||
|
|
||||||
describe('URL preview', () => {
|
describe('URL preview', () => {
|
||||||
test('Error from summaly becomes HTTP 422', async () => {
|
test('Error from summaly becomes HTTP 422', async () => {
|
||||||
const res = await simpleGet('/url?url=https://e:xample.com');
|
const res = await simpleGet('/url?url=https://not-there.example.com');
|
||||||
assert.strictEqual(res.status, 422);
|
assert.strictEqual(res.status, 422);
|
||||||
assert.strictEqual(res.body.error.code, 'URL_PREVIEW_FAILED');
|
assert.strictEqual(res.body.error.code, 'URL_PREVIEW_FAILED');
|
||||||
});
|
});
|
||||||
|
test('Malformed URLs return HTTP 400', async () => {
|
||||||
|
const res = await simpleGet('/url?url=https://e:xample.com');
|
||||||
|
assert.strictEqual(res.status, 400);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('パーソナルメモ機能のテスト', () => {
|
describe('パーソナルメモ機能のテスト', () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue