diff --git a/src/routes/test/system-test.js b/src/routes/test/system-test.js index 5391ba07e..70ca35075 100644 --- a/src/routes/test/system-test.js +++ b/src/routes/test/system-test.js @@ -118,12 +118,13 @@ describe('System', function () { expect(response.body.swap).to.be.a('number'); }); - it('fails (non-admin)', async function () { + it('succeeds (admin)', async function () { const response = await superagent.get(`${serverUrl}/api/v1/system/memory`) - .query({ access_token: user.token }) - .ok(() => true); + .query({ access_token: user.token }); - expect(response.statusCode).to.equal(403); + expect(response.statusCode).to.equal(200); + expect(response.body.memory).to.eql(os.totalmem()); + expect(response.body.swap).to.be.a('number'); }); });