fix(rest) moveFiles: could not rename (#150)

This commit is contained in:
coderaiser 2018-03-16 11:41:14 +02:00
parent 1665b607cf
commit 016b92381c
3 changed files with 36 additions and 33 deletions

View file

@ -1 +1 @@
undefined
hello

View file

@ -35,6 +35,8 @@ test('cloudcmd: rest: mv', (t) => {
fs.mkdirSync(tmp);
const rmTmp = () => rimraf.sync(tmp);
put(`http://localhost:${port}/api/v1/mv`, files)
.then(warp(_pullout, 'string'))
.then((body) => {
@ -44,11 +46,10 @@ test('cloudcmd: rest: mv', (t) => {
const file = fs.readFileSync(`${tmp}/mv.txt`);
fs.writeFileSync(`${fixtureDir}/mv.txt`, file);
rimraf.sync(tmp);
after();
})
.catch(console.error);
.catch(console.error)
.then(rmTmp);
});
});