[Test] Better /drive test

This commit is contained in:
syuilo 2017-02-14 08:06:28 +09:00
parent 73b2c533ec
commit 3e08c670fb

View File

@ -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();
});
}));