mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-27 20:23:09 +02:00
fix(server): 単純にrenoteできないのを修正
This commit is contained in:
parent
a56898df94
commit
02d7ffd305
2 changed files with 16 additions and 0 deletions
|
@ -235,6 +235,21 @@ describe('api:notes/create', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('renote', () => {
|
||||
test('just a renote', () => {
|
||||
expect(v({ renoteId: '1' }))
|
||||
.toBe(VALID);
|
||||
});
|
||||
test('just a quote', () => {
|
||||
expect(v({ text: 'Hello, world!', renoteId: '1' }))
|
||||
.toBe(VALID);
|
||||
});
|
||||
test('reject invalid renoteId', () => {
|
||||
expect(v({ renoteId: 'あ' }))
|
||||
.toBe(INVALID);
|
||||
});
|
||||
});
|
||||
|
||||
test('text, fileIds and poll', () => {
|
||||
expect(v({ text: 'Hello, world!', fileIds: ['1', '2', '3'], poll: { choices: ['a', 'b', 'c'] } }))
|
||||
.toBe(VALID);
|
||||
|
|
|
@ -147,6 +147,7 @@ export const paramDef = {
|
|||
// (re)note with text, files and poll are optional
|
||||
anyOf: [
|
||||
{ required: ['text'] },
|
||||
{ required: ['renoteId'] },
|
||||
{ required: ['fileIds'] },
|
||||
{ required: ['mediaIds'] },
|
||||
{ required: ['poll'] },
|
||||
|
|
Loading…
Reference in a new issue