aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-04-25 16:15:39 +0200
committerChocobozzz <me@florianbigard.com>2018-04-25 16:16:21 +0200
commitcc918ac3f45e32f031cce7b6e0473e5c2c34b8ae (patch)
tree034c0ce9cda37d572fe1c0c34eff750681e18574 /server/tests/api/videos
parentd3e91a5f72ac9c986cdb67d7d6c85bb4819e680c (diff)
downloadPeerTube-cc918ac3f45e32f031cce7b6e0473e5c2c34b8ae.tar.gz
PeerTube-cc918ac3f45e32f031cce7b6e0473e5c2c34b8ae.tar.zst
PeerTube-cc918ac3f45e32f031cce7b6e0473e5c2c34b8ae.zip
Update video-channel routes (again)
Use /video-channels now, it's more simple for clients
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r--server/tests/api/videos/video-channels.ts10
-rw-r--r--server/tests/api/videos/video-nsfw.ts4
2 files changed, 7 insertions, 7 deletions
diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts
index 04e7b8c6a..d24b8ab0b 100644
--- a/server/tests/api/videos/video-channels.ts
+++ b/server/tests/api/videos/video-channels.ts
@@ -63,7 +63,7 @@ describe('Test video channels', function () {
63 description: 'super video channel description', 63 description: 'super video channel description',
64 support: 'super video channel support text' 64 support: 'super video channel support text'
65 } 65 }
66 const res = await addVideoChannel(servers[0].url, servers[0].accessToken, accountUUID, videoChannel) 66 const res = await addVideoChannel(servers[0].url, servers[0].accessToken, videoChannel)
67 videoChannelId = res.body.videoChannel.id 67 videoChannelId = res.body.videoChannel.id
68 videoChannelUUID = res.body.videoChannel.uuid 68 videoChannelUUID = res.body.videoChannel.uuid
69 69
@@ -130,7 +130,7 @@ describe('Test video channels', function () {
130 support: 'video channel support text updated' 130 support: 'video channel support text updated'
131 } 131 }
132 132
133 await updateVideoChannel(servers[0].url, servers[0].accessToken, accountUUID, videoChannelId, videoChannelAttributes) 133 await updateVideoChannel(servers[0].url, servers[0].accessToken, videoChannelId, videoChannelAttributes)
134 134
135 await wait(3000) 135 await wait(3000)
136 }) 136 })
@@ -149,7 +149,7 @@ describe('Test video channels', function () {
149 }) 149 })
150 150
151 it('Should get video channel', async function () { 151 it('Should get video channel', async function () {
152 const res = await getVideoChannel(servers[0].url, accountUUID, videoChannelId) 152 const res = await getVideoChannel(servers[0].url, videoChannelId)
153 153
154 const videoChannel = res.body 154 const videoChannel = res.body
155 expect(videoChannel.displayName).to.equal('video channel updated') 155 expect(videoChannel.displayName).to.equal('video channel updated')
@@ -161,7 +161,7 @@ describe('Test video channels', function () {
161 this.timeout(10000) 161 this.timeout(10000)
162 162
163 for (const server of servers) { 163 for (const server of servers) {
164 const res = await getVideoChannelVideos(server.url, server.accessToken, accountUUID, videoChannelUUID, 0, 5) 164 const res = await getVideoChannelVideos(server.url, server.accessToken, videoChannelUUID, 0, 5)
165 expect(res.body.total).to.equal(1) 165 expect(res.body.total).to.equal(1)
166 expect(res.body.data).to.be.an('array') 166 expect(res.body.data).to.be.an('array')
167 expect(res.body.data).to.have.lengthOf(1) 167 expect(res.body.data).to.have.lengthOf(1)
@@ -170,7 +170,7 @@ describe('Test video channels', function () {
170 }) 170 })
171 171
172 it('Should delete video channel', async function () { 172 it('Should delete video channel', async function () {
173 await deleteVideoChannel(servers[0].url, servers[0].accessToken, accountUUID, videoChannelId) 173 await deleteVideoChannel(servers[0].url, servers[0].accessToken, videoChannelId)
174 }) 174 })
175 175
176 it('Should have video channel deleted', async function () { 176 it('Should have video channel deleted', async function () {
diff --git a/server/tests/api/videos/video-nsfw.ts b/server/tests/api/videos/video-nsfw.ts
index 8901f38f9..b8c85f45b 100644
--- a/server/tests/api/videos/video-nsfw.ts
+++ b/server/tests/api/videos/video-nsfw.ts
@@ -39,7 +39,7 @@ describe('Test video NSFW policy', function () {
39 getVideosListWithToken(server.url, token), 39 getVideosListWithToken(server.url, token),
40 searchVideoWithToken(server.url, 'n', token), 40 searchVideoWithToken(server.url, 'n', token),
41 getAccountVideos(server.url, token, accountUUID, 0, 5), 41 getAccountVideos(server.url, token, accountUUID, 0, 5),
42 getVideoChannelVideos(server.url, token, accountUUID, videoChannelUUID, 0, 5) 42 getVideoChannelVideos(server.url, token, videoChannelUUID, 0, 5)
43 ]) 43 ])
44 } 44 }
45 45
@@ -47,7 +47,7 @@ describe('Test video NSFW policy', function () {
47 getVideosList(server.url), 47 getVideosList(server.url),
48 searchVideo(server.url, 'n'), 48 searchVideo(server.url, 'n'),
49 getAccountVideos(server.url, undefined, accountUUID, 0, 5), 49 getAccountVideos(server.url, undefined, accountUUID, 0, 5),
50 getVideoChannelVideos(server.url, undefined, accountUUID, videoChannelUUID, 0, 5) 50 getVideoChannelVideos(server.url, undefined, videoChannelUUID, 0, 5)
51 ]) 51 ])
52 }) 52 })
53 } 53 }