From 297ad78b1eb01bcf6cff0ecb95808d1c9dc3a47f Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Tue, 8 Sep 2015 10:32:41 +0100 Subject: [PATCH] Add an acceptance test to check the preview endpoint doesn't time out. This endpoint needs a lot more testing. --- .../test/acceptence/coffee/SendingFileTest.coffee | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/services/filestore/test/acceptence/coffee/SendingFileTest.coffee b/services/filestore/test/acceptence/coffee/SendingFileTest.coffee index 7abdc22773..74064f9693 100644 --- a/services/filestore/test/acceptence/coffee/SendingFileTest.coffee +++ b/services/filestore/test/acceptence/coffee/SendingFileTest.coffee @@ -112,3 +112,14 @@ describe "Filestore", -> request.get newFileUrl, (err, response, body)=> body.should.equal @constantFileContent done() + + describe "getting the preview image", -> + + beforeEach -> + @fileUrl = @fileUrl + '?style=preview&cacheWarm=true' + + it "should not time out", (done) -> + @timeout(1000 * 20) + request.get @fileUrl, (err, response, body) => + expect(response).to.not.equal null + done()