* resolve #3023 * fix * fix * better description * widget * fix text * Update post-form.vue * Fix enter-file-name dialog title text * Fix type * On messaging room * Replace moment.js to original one * Fix formatDateTimeString
This commit is contained in:
14
test/api.ts
14
test/api.ts
@ -474,6 +474,20 @@ describe('API', () => {
|
||||
assert.strictEqual(res.body.name, 'Lenna.png');
|
||||
}));
|
||||
|
||||
it('ファイルに名前を付けられる', async(async () => {
|
||||
const alice = await signup({ username: 'alice' });
|
||||
|
||||
const res = await assert.request(server)
|
||||
.post('/drive/files/create')
|
||||
.field('i', alice.token)
|
||||
.field('name', 'Belmond.png')
|
||||
.attach('file', fs.readFileSync(__dirname + '/resources/Lenna.png'), 'Lenna.png');
|
||||
|
||||
expect(res).have.status(200);
|
||||
expect(res.body).be.a('object');
|
||||
expect(res.body).have.property('name').eql('Belmond.png');
|
||||
}));
|
||||
|
||||
it('ファイル無しで怒られる', async(async () => {
|
||||
const alice = await signup({ username: 'alice' });
|
||||
|
||||
|
Reference in New Issue
Block a user