From e22528aca6eb58c8f8005790ac6e76ed4f8ad706 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 10 Mar 2017 11:32:39 +0100 Subject: Server: add config endpoint --- server/tests/utils/config.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 server/tests/utils/config.js (limited to 'server/tests/utils') diff --git a/server/tests/utils/config.js b/server/tests/utils/config.js new file mode 100644 index 000000000..0a507a60f --- /dev/null +++ b/server/tests/utils/config.js @@ -0,0 +1,24 @@ +'use strict' + +const request = require('supertest') + +const configsUtils = { + getConfig +} + +// ---------------------- Export functions -------------------- + +function getConfig (url, end) { + const path = '/api/v1/config' + + request(url) + .get(path) + .set('Accept', 'application/json') + .expect(200) + .expect('Content-Type', /json/) + .end(end) +} + +// --------------------------------------------------------------------------- + +module.exports = configsUtils -- cgit v1.2.3