From 86e3fee620f4182bd3966b2b3743cdd652d4bc0f Mon Sep 17 00:00:00 2001 From: cyanos3 Date: Tue, 5 Nov 2013 07:43:27 -0700 Subject: Add random color to Internet.js --- test/internet.unit.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/internet.unit.js') 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}$/)); + }); + }); }); -- cgit v1.2.3