aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSylvain BANNIER <[email protected]>2016-10-04 22:25:06 +0200
committerMarak <[email protected]>2017-02-11 18:05:52 -0500
commit2b0d1152b603764004fd1f0e2fbed2f30f7b7c28 (patch)
treeec73c7ae5e1c0ec822e14fb56dd1c777cffbd8af /test
parent2456150e5c09a35d0336619a2696274d742ad6d4 (diff)
downloadfaker-2b0d1152b603764004fd1f0e2fbed2f30f7b7c28.tar.xz
faker-2b0d1152b603764004fd1f0e2fbed2f30f7b7c28.zip
#420 Added dataurl method
Diffstat (limited to 'test')
-rw-r--r--test/image.unit.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/image.unit.js b/test/image.unit.js
index e7c7c3c7..a1fb5e5b 100644
--- a/test/image.unit.js
+++ b/test/image.unit.js
@@ -113,4 +113,10 @@ describe("image.js", function () {
assert.equal(transport, 'http://lorempixel.com/640/480/transport');
});
});
+ describe("dataurl", function () {
+ it("returns a blank data", function () {
+ var dataurl = faker.image.dataurl(200,300);
+ assert.equal(dataurl, 'data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20baseProfile%3D%22full%22%20width%3D%22200%22%20height%3D%22300%22%3E%20%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22grey%22%2F%3E%20%20%3Ctext%20x%3D%220%22%20y%3D%2220%22%20font-size%3D%2220%22%20text-anchor%3D%22start%22%20fill%3D%22white%22%3E200x300%3C%2Ftext%3E%20%3C%2Fsvg%3E');
+ });
+ });
});