aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/api/utils.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-02-07 10:39:37 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-02-07 10:39:37 +0100
commitb3077e417056f18225957f65419b87de72117fe3 (patch)
treebe00437c83175ca09b184df6fb21ffe149e11ff8 /tests/api/utils.js
parentc5a8be2b6282d2042e469e1b7c1e7ce8795c026f (diff)
downloadPeerTube-b3077e417056f18225957f65419b87de72117fe3.tar.gz
PeerTube-b3077e417056f18225957f65419b87de72117fe3.tar.zst
PeerTube-b3077e417056f18225957f65419b87de72117fe3.zip
Standard v6
Diffstat (limited to 'tests/api/utils.js')
-rw-r--r--tests/api/utils.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/api/utils.js b/tests/api/utils.js
index a1996b4d7..b71e943ed 100644
--- a/tests/api/utils.js
+++ b/tests/api/utils.js
@@ -4,6 +4,7 @@
4 var child_process = require('child_process') 4 var child_process = require('child_process')
5 var exec = child_process.exec 5 var exec = child_process.exec
6 var fork = child_process.fork 6 var fork = child_process.fork
7 var pathUtils = require('path')
7 var request = require('supertest') 8 var request = require('supertest')
8 9
9 var testUtils = { 10 var testUtils = {
@@ -22,7 +23,7 @@
22 // ---------------------- Export functions -------------------- 23 // ---------------------- Export functions --------------------
23 24
24 function flushTests (callback) { 25 function flushTests (callback) {
25 exec(__dirname + '/../../scripts/clean_test.sh', callback) 26 exec(pathUtils.join(__dirname, '../../scripts/clean_test.sh'), callback)
26 } 27 }
27 28
28 function getFriendsList (url, end) { 29 function getFriendsList (url, end) {
@@ -139,7 +140,7 @@
139 detached: true 140 detached: true
140 } 141 }
141 142
142 var app = fork(__dirname + '/../../server.js', [], options) 143 var app = fork(pathUtils.join(__dirname, '../../server.js'), [], options)
143 app.stdout.on('data', function onStdout (data) { 144 app.stdout.on('data', function onStdout (data) {
144 var dont_continue = false 145 var dont_continue = false
145 // Check if all required sentences are here 146 // Check if all required sentences are here
@@ -175,7 +176,7 @@
175 .set('Accept', 'application/json') 176 .set('Accept', 'application/json')
176 .field('name', name) 177 .field('name', name)
177 .field('description', description) 178 .field('description', description)
178 .attach('input_video', __dirname + '/fixtures/' + fixture) 179 .attach('input_video', pathUtils.join(__dirname, 'fixtures', fixture))
179 .expect(201) 180 .expect(201)
180 .end(end) 181 .end(end)
181 } 182 }