From c0cc2744c69762bb3516bd42bb2992b24d59194b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20M=C3=A9tais?= Date: Mon, 27 Apr 2015 18:53:18 +0200 Subject: [PATCH] Add a test --- test/api/apiTest.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/api/apiTest.js b/test/api/apiTest.js index 74be9f3..23b16a1 100644 --- a/test/api/apiTest.js +++ b/test/api/apiTest.js @@ -96,7 +96,8 @@ describe('api', function() { body: { url: wwwUrl + '/simple-page.html', waitForResponse: true, - screenshot: true + screenshot: true, + device: 'tablet' }, json: true, headers: { @@ -164,6 +165,9 @@ describe('api', function() { body.should.have.a.property('javascriptExecutionTree').that.is.an('object'); body.javascriptExecutionTree.should.deep.equal({}); + // Check if the device is set to tablet + body.params.options.should.have.a.property('device').that.equals('tablet'); + // Check if the screenshot temporary file was correctly removed body.params.options.should.not.have.a.property('screenshot'); // Check if the screenshot buffer was correctly removed