diff --git a/lib/providers/file.js b/lib/providers/file.js index f39da75..656a0d5 100644 --- a/lib/providers/file.js +++ b/lib/providers/file.js @@ -153,7 +153,6 @@ FileSystemProvider.prototype.getFile = function (container, file, cb) { FileSystemProvider.prototype.removeFile = function (container, file, cb) { if(!validateName(container, cb)) return; - var container = options.container; if(!validateName(file, cb)) return; var filePath = path.join(this.root, container, file); diff --git a/test/fs.test.js b/test/fs.test.js index 5483505..d770772 100644 --- a/test/fs.test.js +++ b/test/fs.test.js @@ -118,6 +118,21 @@ describe('FileSystem based storage provider', function () { }); }); + it('should remove a file', function (done) { + client.removeFile('c1', 'f1.txt', function (err) { + assert(!err); + done(err); + }); + }); + + it('should get no files from a container', function (done) { + client.getFiles('c1', function (err, files) { + assert(!err); + assert.equal(0, files.length); + done(err, files); + }); + }); + it('should destroy a container c1', function (done) { client.destroyContainer('c1', function (err, container) { // console.error(err);