aboutsummaryrefslogtreecommitdiff
path: root/test/random.unit.js
diff options
context:
space:
mode:
authorJakub Mandula <[email protected]>2017-02-26 13:51:40 +0000
committerJakub Mandula <[email protected]>2017-02-26 13:51:40 +0000
commit232a2a58d70935c57d311b5ba237347f703c2131 (patch)
tree69f695e62e17386988c47f8522bf5e14db193839 /test/random.unit.js
parentd6c20353360ef1eefb56128eeb50ece4f5845372 (diff)
parentf379057be0112d6732b056d93d1380be18e1087a (diff)
downloadfaker-232a2a58d70935c57d311b5ba237347f703c2131.tar.xz
faker-232a2a58d70935c57d311b5ba237347f703c2131.zip
Merge branch 'Mark/origin' into creditCard
Diffstat (limited to 'test/random.unit.js')
-rw-r--r--test/random.unit.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/random.unit.js b/test/random.unit.js
index 94a7167d..6214039b 100644
--- a/test/random.unit.js
+++ b/test/random.unit.js
@@ -115,4 +115,16 @@ describe("random.js", function () {
assert.ok(/^\d+\.\d+\.\d+$/.test(semver));
});
});
+
+ describe('alphaNumeric', function() {
+ var alphaNumeric = faker.random.alphaNumeric;
+
+ it('should generate single character when no additional argument was provided', function() {
+ assert.ok(alphaNumeric().length === 1);
+ })
+
+ it('should generate many random characters', function() {
+ assert.ok(alphaNumeric(5).length === 5);
+ })
+ })
});