diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-02-14 08:06:28 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-02-14 08:06:28 +0900 |
| commit | 3e08c670fb2dc3b38d879d88a158caea292b6875 (patch) | |
| tree | 6871e282305069f7ac488161e1554bd2abc52fd9 | |
| parent | [Cliewnt] Display drive usagae in drive window (diff) | |
| download | misskey-3e08c670fb2dc3b38d879d88a158caea292b6875.tar.gz misskey-3e08c670fb2dc3b38d879d88a158caea292b6875.tar.bz2 misskey-3e08c670fb2dc3b38d879d88a158caea292b6875.zip | |
[Test] Better /drive test
| -rw-r--r-- | test/api.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/api.js b/test/api.js index 31983bfe29..7b74eeb5cf 100644 --- a/test/api.js +++ b/test/api.js @@ -766,14 +766,22 @@ describe('API', () => { describe('drive', () => { it('ドライブ情報を取得できる', () => new Promise(async (done) => { const me = await insertSakurako(); - const file = await insertDriveFile({ + await insertDriveFile({ + user_id: me._id, + datasize: 256 + }); + await insertDriveFile({ + user_id: me._id, + datasize: 512 + }); + await insertDriveFile({ user_id: me._id, datasize: 1024 }); request('/drive', {}, me).then(res => { res.should.have.status(200); res.body.should.be.a('object'); - res.body.should.have.property('usage').eql(1024); + res.body.should.have.property('usage').eql(1792); done(); }); })); |