diff options
| author | cyanos3 <[email protected]> | 2013-11-05 07:43:27 -0700 |
|---|---|---|
| committer | cyanos3 <[email protected]> | 2013-11-05 07:43:27 -0700 |
| commit | 86e3fee620f4182bd3966b2b3743cdd652d4bc0f (patch) | |
| tree | f5e32a279e428cfc5a401854e8eae54a0cd4b073 /test | |
| parent | 7f825fb253457f1877e3d20f252e736b903eefa2 (diff) | |
| download | faker-86e3fee620f4182bd3966b2b3743cdd652d4bc0f.tar.xz faker-86e3fee620f4182bd3966b2b3743cdd652d4bc0f.zip | |
Add random color to Internet.js
Diffstat (limited to 'test')
| -rw-r--r-- | test/internet.unit.js | 7 |
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}$/)); + }); + }); }); |
