diff options
| author | Marak <[email protected]> | 2016-02-08 03:30:34 +0530 |
|---|---|---|
| committer | Marak <[email protected]> | 2016-02-08 03:30:34 +0530 |
| commit | d50103dca36292c07a88a09a3f1b0bf704e978b0 (patch) | |
| tree | ad0571db48526cb4da4c935dacb5a37b66c1a8d3 /test | |
| parent | 03950629e23566a0e74a43bab4a01cf7d21e7852 (diff) | |
| parent | f74bafc07d2713151446e917b254a25a1660a45e (diff) | |
| download | faker-d50103dca36292c07a88a09a3f1b0bf704e978b0.tar.xz faker-d50103dca36292c07a88a09a3f1b0bf704e978b0.zip | |
Merge pull request #326 from puhastudio/internet-domainwords
[fix] Prevent apostrophes in return value of internet#domainWords
Diffstat (limited to 'test')
| -rw-r--r-- | test/internet.unit.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/internet.unit.js b/test/internet.unit.js index 9218a56e..5ed0b664 100644 --- a/test/internet.unit.js +++ b/test/internet.unit.js @@ -72,6 +72,16 @@ describe("internet.js", function () { faker.name.firstName.restore(); }); + describe("when the firstName used contains a apostrophe", function () { + sinon.stub(faker.name, 'firstName').returns('d\'angelo'); + var domain_word = faker.internet.domainWord(); + + it("should remove the apostrophe", function () { + assert.strictEqual(domain_word, 'dangelo'); + }); + + faker.name.firstName.restore(); + }); }); describe('protocol()', function () { |
