blob: 1edcb8bef31f92461a0b100da9b55fae477917c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
if (typeof module !== 'undefined') {
var assert = require('assert');
var sinon = require('sinon');
var faker = require('../index');
}
describe("system.js", function () {
describe("fileName()", function () {
it("returns filenames without system path seperators", function () {
sinon.stub(faker.random, 'words').returns('24/7');
var fileName = faker.system.fileName();
assert.equal(fileName.indexOf('/'), -1, 'generated fileNames should not have path seperators');
faker.random.words.restore();
});
});
describe("commonFileName()", function () {
it("returns filenames without system path seperators", function () {
sinon.stub(faker.random, 'words').returns('24/7');
var fileName = faker.system.commonFileName();
assert.equal(fileName.indexOf('/'), -1, 'generated commonFileNames should not have path seperators');
faker.random.words.restore();
});
});
});
|