test: fix system test
This commit is contained in:
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user