aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/check-params/video-imports.ts2
-rw-r--r--server/tests/api/users/users-multiple-servers.ts7
-rw-r--r--server/tests/api/videos/video-nsfw.ts6
3 files changed, 8 insertions, 7 deletions
diff --git a/server/tests/api/check-params/video-imports.ts b/server/tests/api/check-params/video-imports.ts
index 5975985a1..44645b0e2 100644
--- a/server/tests/api/check-params/video-imports.ts
+++ b/server/tests/api/check-params/video-imports.ts
@@ -28,7 +28,6 @@ describe('Test video imports API validator', function () {
28 let userAccessToken = '' 28 let userAccessToken = ''
29 let accountName: string 29 let accountName: string
30 let channelId: number 30 let channelId: number
31 let channelUUID: string
32 31
33 // --------------------------------------------------------------- 32 // ---------------------------------------------------------------
34 33
@@ -49,7 +48,6 @@ describe('Test video imports API validator', function () {
49 { 48 {
50 const res = await getMyUserInformation(server.url, server.accessToken) 49 const res = await getMyUserInformation(server.url, server.accessToken)
51 channelId = res.body.videoChannels[ 0 ].id 50 channelId = res.body.videoChannels[ 0 ].id
52 channelUUID = res.body.videoChannels[ 0 ].uuid
53 accountName = res.body.account.name + '@' + res.body.account.host 51 accountName = res.body.account.name + '@' + res.body.account.host
54 } 52 }
55 }) 53 })
diff --git a/server/tests/api/users/users-multiple-servers.ts b/server/tests/api/users/users-multiple-servers.ts
index 575e04546..b67072851 100644
--- a/server/tests/api/users/users-multiple-servers.ts
+++ b/server/tests/api/users/users-multiple-servers.ts
@@ -27,6 +27,7 @@ describe('Test users with multiple servers', function () {
27 let servers: ServerInfo[] = [] 27 let servers: ServerInfo[] = []
28 let user: User 28 let user: User
29 let userAccountName: string 29 let userAccountName: string
30 let userAccountUUID: string
30 let userVideoChannelUUID: string 31 let userVideoChannelUUID: string
31 let userId: number 32 let userId: number
32 let videoUUID: string 33 let videoUUID: string
@@ -62,7 +63,9 @@ describe('Test users with multiple servers', function () {
62 63
63 { 64 {
64 const res = await getMyUserInformation(servers[0].url, userAccessToken) 65 const res = await getMyUserInformation(servers[0].url, userAccessToken)
65 userAccountName = res.body.account.name + '@' + res.body.account.host 66 const account: Account = res.body.account
67 userAccountName = account.name + '@' + account.host
68 userAccountUUID = account.uuid
66 } 69 }
67 70
68 { 71 {
@@ -196,7 +199,7 @@ describe('Test users with multiple servers', function () {
196 199
197 it('Should not have actor files', async () => { 200 it('Should not have actor files', async () => {
198 for (const server of servers) { 201 for (const server of servers) {
199 await checkActorFilesWereRemoved(userAccountName, server.serverNumber) 202 await checkActorFilesWereRemoved(userAccountUUID, server.serverNumber)
200 await checkActorFilesWereRemoved(userVideoChannelUUID, server.serverNumber) 203 await checkActorFilesWereRemoved(userVideoChannelUUID, server.serverNumber)
201 } 204 }
202 }) 205 })
diff --git a/server/tests/api/videos/video-nsfw.ts b/server/tests/api/videos/video-nsfw.ts
index 370e69d2a..891148b07 100644
--- a/server/tests/api/videos/video-nsfw.ts
+++ b/server/tests/api/videos/video-nsfw.ts
@@ -34,7 +34,7 @@ describe('Test video NSFW policy', function () {
34 return getMyUserInformation(server.url, server.accessToken) 34 return getMyUserInformation(server.url, server.accessToken)
35 .then(res => { 35 .then(res => {
36 const user: User = res.body 36 const user: User = res.body
37 const videoChannelUUID = user.videoChannels[0].uuid 37 const videoChannelName = user.videoChannels[0].name
38 const accountName = user.account.name + '@' + user.account.host 38 const accountName = user.account.name + '@' + user.account.host
39 39
40 if (token) { 40 if (token) {
@@ -42,7 +42,7 @@ describe('Test video NSFW policy', function () {
42 getVideosListWithToken(server.url, token, query), 42 getVideosListWithToken(server.url, token, query),
43 searchVideoWithToken(server.url, 'n', token, query), 43 searchVideoWithToken(server.url, 'n', token, query),
44 getAccountVideos(server.url, token, accountName, 0, 5, undefined, query), 44 getAccountVideos(server.url, token, accountName, 0, 5, undefined, query),
45 getVideoChannelVideos(server.url, token, videoChannelUUID, 0, 5, undefined, query) 45 getVideoChannelVideos(server.url, token, videoChannelName, 0, 5, undefined, query)
46 ]) 46 ])
47 } 47 }
48 48
@@ -50,7 +50,7 @@ describe('Test video NSFW policy', function () {
50 getVideosList(server.url), 50 getVideosList(server.url),
51 searchVideo(server.url, 'n'), 51 searchVideo(server.url, 'n'),
52 getAccountVideos(server.url, undefined, accountName, 0, 5), 52 getAccountVideos(server.url, undefined, accountName, 0, 5),
53 getVideoChannelVideos(server.url, undefined, videoChannelUUID, 0, 5) 53 getVideoChannelVideos(server.url, undefined, videoChannelName, 0, 5)
54 ]) 54 ])
55 }) 55 })
56 } 56 }