merge: timeline 1

This commit is contained in:
syuilo 2023-10-03 20:26:11 +09:00 committed by Mar0xy
parent fe4345d191
commit f6ba5cfaf4
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
84 changed files with 1898 additions and 947 deletions

View file

@ -38,23 +38,10 @@ describe('users/notes', () => {
await app.close();
});
test('ファイルタイプ指定 (jpg)', async () => {
test('withFiles', async () => {
const res = await api('/users/notes', {
userId: alice.id,
fileType: ['image/jpeg'],
}, alice);
assert.strictEqual(res.status, 200);
assert.strictEqual(Array.isArray(res.body), true);
assert.strictEqual(res.body.length, 2);
assert.strictEqual(res.body.some((note: any) => note.id === jpgNote.id), true);
assert.strictEqual(res.body.some((note: any) => note.id === jpgPngNote.id), true);
});
test('ファイルタイプ指定 (jpg or png)', async () => {
const res = await api('/users/notes', {
userId: alice.id,
fileType: ['image/jpeg', 'image/png'],
withFiles: true,
}, alice);
assert.strictEqual(res.status, 200);