diff options
| author | tamaina <tamaina@hotmail.co.jp> | 2019-07-08 13:46:31 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-07-08 13:46:31 +0900 |
| commit | 5343b005df9446c3cc13bdfb419db9b8720e5946 (patch) | |
| tree | bc8c8bdf0da2d3d9237eed2a4f14309c6c26c410 /test/api.ts | |
| parent | Better display in narrow desktop and choosing client type; Fix #1442, Fix #21... (diff) | |
| download | sharkey-5343b005df9446c3cc13bdfb419db9b8720e5946.tar.gz sharkey-5343b005df9446c3cc13bdfb419db9b8720e5946.tar.bz2 sharkey-5343b005df9446c3cc13bdfb419db9b8720e5946.zip | |
Improve paste uploading Resolve #3023 (#4542)
* 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
Diffstat (limited to 'test/api.ts')
| -rw-r--r-- | test/api.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/api.ts b/test/api.ts index 570ab6833d..343112b4aa 100644 --- a/test/api.ts +++ b/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' }); |