diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/system.unit.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/system.unit.js b/test/system.unit.js index 1edcb8be..dfcfcb0b 100644 --- a/test/system.unit.js +++ b/test/system.unit.js @@ -5,6 +5,26 @@ if (typeof module !== 'undefined') { } describe("system.js", function () { + describe("directoryPath()", function () { + it("returns unix fs directory full path", function () { + sinon.stub(faker.random, 'words').returns('24/7'); + var directoryPath = faker.system.directoryPath(); + assert.equal(directoryPath.indexOf('/'), 0, 'generated directoryPath should start with /'); + + faker.random.words.restore(); + }); + }); + + describe("filePath()", function () { + it("returns unix fs file full path", function () { + sinon.stub(faker.random, 'words').returns('24/7'); + var filePath = faker.system.filePath(); + assert.equal(filePath.indexOf('/'), 0, 'generated filePath should start with /'); + + faker.random.words.restore(); + }); + }); + describe("fileName()", function () { it("returns filenames without system path seperators", function () { sinon.stub(faker.random, 'words').returns('24/7'); |
