From c240733aee9c6d2d11fa0de3372a7a39d07d68ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 26 Nov 2018 17:33:39 -0500 Subject: [PATCH] fix logs test --- test/controllers-admin.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/controllers-admin.js b/test/controllers-admin.js index 840f1bf98e..7f72de3c05 100644 --- a/test/controllers-admin.js +++ b/test/controllers-admin.js @@ -383,11 +383,15 @@ describe('Admin Controllers', function () { }); it('should load /admin/advanced/logs', function (done) { - request(nconf.get('url') + '/api/admin/advanced/logs', { jar: jar, json: true }, function (err, res, body) { + var fs = require('fs'); + fs.appendFile(meta.logs.path, 'dummy log', function (err) { assert.ifError(err); - assert.equal(res.statusCode, 200); - assert(body); - done(); + request(nconf.get('url') + '/api/admin/advanced/logs', { jar: jar, json: true }, function (err, res, body) { + assert.ifError(err); + assert.equal(res.statusCode, 200); + assert(body); + done(); + }); }); });