drop messaging (#9919)

* drop messaging (from backend)

* wip
This commit is contained in:
syuilo
2023-02-15 13:06:06 +09:00
committed by GitHub
parent d0aba46ee3
commit 8f2049bcd2
47 changed files with 18 additions and 3292 deletions

View File

@@ -778,63 +778,6 @@ describe('API: Endpoints', () => {
}));
});
describe('messaging/messages/create', () => {
test('メッセージを送信できる', async () => {
const res = await api('/messaging/messages/create', {
userId: bob.id,
text: 'test'
}, alice);
assert.strictEqual(res.status, 200);
assert.strictEqual(typeof res.body === 'object' && !Array.isArray(res.body), true);
assert.strictEqual(res.body.text, 'test');
}));
test('自分自身にはメッセージを送信できない', async () => {
const res = await api('/messaging/messages/create', {
userId: alice.id,
text: 'Yo'
}, alice);
assert.strictEqual(res.status, 400);
}));
test('存在しないユーザーにはメッセージを送信できない', async () => {
const res = await api('/messaging/messages/create', {
userId: '000000000000000000000000',
text: 'test'
}, alice);
assert.strictEqual(res.status, 400);
}));
test('不正なユーザーIDで怒られる', async () => {
const res = await api('/messaging/messages/create', {
userId: 'foo',
text: 'test'
}, alice);
assert.strictEqual(res.status, 400);
}));
test('テキストが無くて怒られる', async () => {
const res = await api('/messaging/messages/create', {
userId: bob.id
}, alice);
assert.strictEqual(res.status, 400);
}));
test('文字数オーバーで怒られる', async () => {
const res = await api('/messaging/messages/create', {
userId: bob.id,
text: '!'.repeat(1001)
}, alice);
assert.strictEqual(res.status, 400);
}));
});
describe('notes/replies', () => {
test('自分に閲覧権限のない投稿は含まれない', async () => {
const alicePost = await post(alice, {