aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-03-10 11:32:39 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-03-10 11:32:39 +0100
commite22528aca6eb58c8f8005790ac6e76ed4f8ad706 (patch)
tree9669efb759249438e2b065171f19f817f7d48440 /server/tests/utils
parenta2457e9de4a598ea34629bc40eb882ce03ec0ede (diff)
downloadPeerTube-e22528aca6eb58c8f8005790ac6e76ed4f8ad706.tar.gz
PeerTube-e22528aca6eb58c8f8005790ac6e76ed4f8ad706.tar.zst
PeerTube-e22528aca6eb58c8f8005790ac6e76ed4f8ad706.zip
Server: add config endpoint
Diffstat (limited to 'server/tests/utils')
-rw-r--r--server/tests/utils/config.js24
1 files changed, 24 insertions, 0 deletions
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 @@
1'use strict'
2
3const request = require('supertest')
4
5const configsUtils = {
6 getConfig
7}
8
9// ---------------------- Export functions --------------------
10
11function getConfig (url, end) {
12 const path = '/api/v1/config'
13
14 request(url)
15 .get(path)
16 .set('Accept', 'application/json')
17 .expect(200)
18 .expect('Content-Type', /json/)
19 .end(end)
20}
21
22// ---------------------------------------------------------------------------
23
24module.exports = configsUtils