diff options
| author | David Kossoglyad <[email protected]> | 2021-04-03 01:44:44 +0300 |
|---|---|---|
| committer | David Kossoglyad <[email protected]> | 2021-04-03 01:44:44 +0300 |
| commit | 3e6d3c9296c6d839b6412eea575e13e2c3d42fdf (patch) | |
| tree | d33145936e6f03ac40cc894835e4cadf34cd1be0 /test/database.unit.js | |
| parent | 26e979a9b2414cf1a333f5d2791d457a91b092cd (diff) | |
| parent | c9764abd20a198e318367952a94587eda1bac645 (diff) | |
| download | faker-3e6d3c9296c6d839b6412eea575e13e2c3d42fdf.tar.xz faker-3e6d3c9296c6d839b6412eea575e13e2c3d42fdf.zip | |
Merge branch 'master' into feature/add-hebrew-localization
Diffstat (limited to 'test/database.unit.js')
| -rw-r--r-- | test/database.unit.js | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/test/database.unit.js b/test/database.unit.js index b3955fea..9d1dbcb2 100644 --- a/test/database.unit.js +++ b/test/database.unit.js @@ -1,51 +1,51 @@ if (typeof module !== 'undefined') { - var assert = require('assert'); - var sinon = require('sinon'); - var faker = require('../index'); + var assert = require('assert'); + var sinon = require('sinon'); + var faker = require('../index'); } describe("database.js", function () { - describe("column()", function () { - it("returns a column name", function () { - sinon.stub(faker.database, 'column').returns('title'); - var column = faker.database.column(); - var expected = 'title'; - - assert.strictEqual(column, expected, "The column name should be equals " + expected + ". Current is " + column); - faker.database.column.restore(); - }); + describe("column()", function () { + it("returns a column name", function () { + sinon.stub(faker.database, 'column').returns('title'); + var column = faker.database.column(); + var expected = 'title'; + + assert.strictEqual(column, expected, "The column name should be equals " + expected + ". Current is " + column); + faker.database.column.restore(); }); + }); - describe("collation()", function () { - it("returns a collation", function () { - sinon.stub(faker.database, 'collation').returns('utf8_bin'); - var collation = faker.database.collation(); - var expected = 'utf8_bin'; + describe("collation()", function () { + it("returns a collation", function () { + sinon.stub(faker.database, 'collation').returns('utf8_bin'); + var collation = faker.database.collation(); + var expected = 'utf8_bin'; - assert.strictEqual(collation, expected, "The collation should be equals " + expected + ". Current is " + collation); - faker.database.collation.restore(); - }); + assert.strictEqual(collation, expected, "The collation should be equals " + expected + ". Current is " + collation); + faker.database.collation.restore(); }); + }); - describe("engine()", function () { - it("returns an engine", function () { - sinon.stub(faker.database, 'engine').returns('InnoDB'); - var engine = faker.database.engine(); - var expected = 'InnoDB'; + describe("engine()", function () { + it("returns an engine", function () { + sinon.stub(faker.database, 'engine').returns('InnoDB'); + var engine = faker.database.engine(); + var expected = 'InnoDB'; - assert.strictEqual(engine, expected, "The db engine should be equals " + expected + ". Current is " + engine); - faker.database.engine.restore(); - }); + assert.strictEqual(engine, expected, "The db engine should be equals " + expected + ". Current is " + engine); + faker.database.engine.restore(); }); + }); - describe("type()", function () { - it("returns a column type", function () { - sinon.stub(faker.database, 'type').returns('int'); - var type = faker.database.type(); - var expected = 'int'; + describe("type()", function () { + it("returns a column type", function () { + sinon.stub(faker.database, 'type').returns('int'); + var type = faker.database.type(); + var expected = 'int'; - assert.strictEqual(type, expected, "The column type should be equals " + expected + ". Current is " + type); - faker.database.type.restore(); - }); + assert.strictEqual(type, expected, "The column type should be equals " + expected + ". Current is " + type); + faker.database.type.restore(); }); + }); }); |
