aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatthew Bergman <[email protected]>2013-03-15 09:27:25 -0700
committerMatthew Bergman <[email protected]>2013-03-15 09:27:25 -0700
commit03b7b79fea39228e50c188f8d805276da971c9bb (patch)
tree61e6245ddb5842dfd8d8ec76b2e127a4b6323fd7 /test
parentbfa0e41d33adbc3446fd67f881994ddac15a216e (diff)
parentbc0bf3b6a89fe95eda63454c6cc276d6be040c62 (diff)
downloadfaker-03b7b79fea39228e50c188f8d805276da971c9bb.tar.xz
faker-03b7b79fea39228e50c188f8d805276da971c9bb.zip
Merge pull request #44 from fedosov/master
This should fix #42
Diffstat (limited to 'test')
-rw-r--r--test/helpers.unit.js7
-rw-r--r--test/internet.unit.js6
2 files changed, 10 insertions, 3 deletions
diff --git a/test/helpers.unit.js b/test/helpers.unit.js
index 4de3f588..4c7ee808 100644
--- a/test/helpers.unit.js
+++ b/test/helpers.unit.js
@@ -21,6 +21,13 @@ describe("helpers.js", function() {
});
});
+ describe("slugify()", function () {
+ it("removes unwanted characters from URI string", function () {
+ assert.equal(Faker.Helpers.slugify("Aiden.HarÂȘann"), "Aiden.Harann");
+ assert.equal(Faker.Helpers.slugify("d'angelo.net"), "dangelo.net");
+ });
+ });
+
describe("createCard()", function() {
it("returns an object", function() {
var card = Faker.Helpers.createCard();
diff --git a/test/internet.unit.js b/test/internet.unit.js
index ea216952..35b3a0f1 100644
--- a/test/internet.unit.js
+++ b/test/internet.unit.js
@@ -7,11 +7,11 @@ if (typeof module !== 'undefined') {
describe("internet.js", function () {
describe("email()", function () {
it("returns a userName@domainName", function () {
- sinon.stub(Faker.Internet, 'userName').returns('foo');
- sinon.stub(Faker.Internet, 'domainName').returns('bar.com');
+ sinon.stub(Faker.Internet, 'userName').returns('Aiden.HarÂȘann');
+ sinon.stub(Faker.Internet, 'domainName').returns("ex'ample.net");
var email = Faker.Internet.email();
- assert.equal(email, '[email protected]');
+ assert.equal(email, '[email protected]');
Faker.Internet.userName.restore();
Faker.Internet.domainName.restore();