move config route under dashboard
it's essentially giving info for various parts of the ui
This commit is contained in:
@@ -7,12 +7,10 @@
|
||||
'use strict';
|
||||
|
||||
const constants = require('../constants.js'),
|
||||
database = require('../database.js'),
|
||||
expect = require('expect.js'),
|
||||
safe = require('safetydance'),
|
||||
server = require('../server.js'),
|
||||
superagent = require('superagent'),
|
||||
util = require('util');
|
||||
superagent = require('superagent');
|
||||
|
||||
const SERVER_URL = 'http://localhost:' + constants.PORT;
|
||||
|
||||
@@ -64,12 +62,12 @@ describe('Server', function () {
|
||||
after(server.stop);
|
||||
|
||||
it('config fails due missing token', async function () {
|
||||
const response = await superagent.get(SERVER_URL + '/api/v1/config').ok(() => true);
|
||||
const response = await superagent.get(SERVER_URL + '/api/v1/dashboard/config').ok(() => true);
|
||||
expect(response.statusCode).to.equal(401);
|
||||
});
|
||||
|
||||
it('config fails due wrong token', async function () {
|
||||
const response = await superagent.get(SERVER_URL + '/api/v1/config').query({ access_token: 'somewrongtoken' }).ok(() => true);
|
||||
const response = await superagent.get(SERVER_URL + '/api/v1/dashboard/config').query({ access_token: 'somewrongtoken' }).ok(() => true);
|
||||
expect(response.status).to.equal(401);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user