[API] Fix bug

This commit is contained in:
syuilo 2017-02-14 06:42:01 +09:00
parent 2012477c82
commit a529b51c2d
2 changed files with 22 additions and 6 deletions

View file

@ -3,7 +3,7 @@
/**
* Module dependencies
*/
import DriveFile from './models/drive-file';
import DriveFile from '../models/drive-file';
/**
* Get drive information

View file

@ -763,6 +763,22 @@ describe('API', () => {
}));
});
describe('drive', () => {
it('ドライブ情報を取得できる', () => new Promise(async (done) => {
const me = await insertSakurako();
const file = 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);
done();
});
}));
});
describe('drive/files/create', () => {
it('ファイルを作成できる', () => new Promise(async (done) => {
const me = await insertSakurako();