diff options
| author | Marak <[email protected]> | 2016-02-08 03:50:09 +0530 |
|---|---|---|
| committer | Marak <[email protected]> | 2016-02-08 03:50:09 +0530 |
| commit | 39c47bdaa0e666aca27be4e9d831e19a9c66077a (patch) | |
| tree | 7af69a317887cbba5360d4ae12de884beea851f6 /test | |
| parent | 6cd71e19f705f17a1ffadbfacef9324f275e61e0 (diff) | |
| parent | 6bebc0b1992cbc1c0f6851d616463a8a0c6c64db (diff) | |
| download | faker-39c47bdaa0e666aca27be4e9d831e19a9c66077a.tar.xz faker-39c47bdaa0e666aca27be4e9d831e19a9c66077a.zip | |
Merge pull request #313 from morrislaptop/image-url-dimensions-and-randomizer
[api] Added randomness to image generation
* Random image height and width parameter
Diffstat (limited to 'test')
| -rw-r--r-- | test/image.unit.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/image.unit.js b/test/image.unit.js index 04bf3475..1429dff9 100644 --- a/test/image.unit.js +++ b/test/image.unit.js @@ -21,6 +21,12 @@ describe("image.js", function () { assert.equal(imageUrl, 'http://lorempixel.com/100/100/abstract'); }); + it.only("returns a random image url from lorempixel with a randomizer", function () { + var imageUrl = faker.image.imageUrl(100, 100, undefined, true); + + console.log(imageUrl); + assert.ok(imageUrl.match(/^http:\/\/lorempixel.com\/100\/100\?[\d]+$/)); + }); }); describe("avatar()", function () { it("return a random avatar from UIFaces", function () { |
