aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils')
-rw-r--r--server/tests/utils/cli.ts2
-rw-r--r--server/tests/utils/clients.ts2
-rw-r--r--server/tests/utils/videos.ts5
3 files changed, 6 insertions, 3 deletions
diff --git a/server/tests/utils/cli.ts b/server/tests/utils/cli.ts
index 5f07a832e..4098fdf6f 100644
--- a/server/tests/utils/cli.ts
+++ b/server/tests/utils/cli.ts
@@ -7,7 +7,7 @@ function getEnvCli (server?: ServerInfo) {
7} 7}
8 8
9async function execCLI (command: string) { 9async function execCLI (command: string) {
10 return new Promise((res, rej) => { 10 return new Promise<string>((res, rej) => {
11 exec(command, (err, stdout, stderr) => { 11 exec(command, (err, stdout, stderr) => {
12 if (err) return rej(err) 12 if (err) return rej(err)
13 13
diff --git a/server/tests/utils/clients.ts b/server/tests/utils/clients.ts
index 22676bb38..a8c5b51c5 100644
--- a/server/tests/utils/clients.ts
+++ b/server/tests/utils/clients.ts
@@ -1,7 +1,7 @@
1import * as request from 'supertest' 1import * as request from 'supertest'
2 2
3function getClient (url: string) { 3function getClient (url: string) {
4 const path = '/api/v1/clients/local' 4 const path = '/api/v1/oauth-clients/local'
5 5
6 return request(url) 6 return request(url)
7 .get(path) 7 .get(path)
diff --git a/server/tests/utils/videos.ts b/server/tests/utils/videos.ts
index 509a2430a..83271beca 100644
--- a/server/tests/utils/videos.ts
+++ b/server/tests/utils/videos.ts
@@ -185,10 +185,13 @@ function uploadVideo (url: string, accessToken: string, videoAttributesArg: Vide
185 .field('name', attributes.name) 185 .field('name', attributes.name)
186 .field('category', attributes.category.toString()) 186 .field('category', attributes.category.toString())
187 .field('licence', attributes.licence.toString()) 187 .field('licence', attributes.licence.toString())
188 .field('language', attributes.language.toString())
189 .field('nsfw', JSON.stringify(attributes.nsfw)) 188 .field('nsfw', JSON.stringify(attributes.nsfw))
190 .field('description', attributes.description) 189 .field('description', attributes.description)
191 190
191 if (attributes.language !== undefined) {
192 req.field('language', attributes.language.toString())
193 }
194
192 for (let i = 0; i < attributes.tags.length; i++) { 195 for (let i = 0; i < attributes.tags.length; i++) {
193 req.field('tags[' + i + ']', attributes.tags[i]) 196 req.field('tags[' + i + ']', attributes.tags[i])
194 } 197 }