aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorcyanos3 <[email protected]>2013-11-05 07:43:27 -0700
committercyanos3 <[email protected]>2013-11-05 07:43:27 -0700
commit86e3fee620f4182bd3966b2b3743cdd652d4bc0f (patch)
treef5e32a279e428cfc5a401854e8eae54a0cd4b073 /test
parent7f825fb253457f1877e3d20f252e736b903eefa2 (diff)
downloadfaker-86e3fee620f4182bd3966b2b3743cdd652d4bc0f.tar.xz
faker-86e3fee620f4182bd3966b2b3743cdd652d4bc0f.zip
Add random color to Internet.js
Diffstat (limited to 'test')
-rw-r--r--test/internet.unit.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/internet.unit.js b/test/internet.unit.js
index d7d823cf..44879c37 100644
--- a/test/internet.unit.js
+++ b/test/internet.unit.js
@@ -82,4 +82,11 @@ describe("internet.js", function () {
assert.equal(parts.length, 4);
});
});
+
+ describe("color()", function () {
+ it("returns a valid hex value (like #ffffff)", function () {
+ var color = Faker.Internet.color(100, 100, 100);
+ assert.ok(color.match(/^#[a-f0-9]{6}$/));
+ });
+ });
});