diff options
author | Chocobozzz <me@florianbigard.com> | 2018-05-25 09:57:16 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-25 10:41:07 +0200 |
commit | ad9e39fb815d85e5e718c40540fa75471474fa17 (patch) | |
tree | 960accb16bca0fac7694b3f3d5d038534b66c224 /server/tests/api/videos | |
parent | 06be7ed0b27b371465c5d1b7f92b4adfb0b866ea (diff) | |
download | PeerTube-ad9e39fb815d85e5e718c40540fa75471474fa17.tar.gz PeerTube-ad9e39fb815d85e5e718c40540fa75471474fa17.tar.zst PeerTube-ad9e39fb815d85e5e718c40540fa75471474fa17.zip |
Only use account name in routes
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r-- | server/tests/api/videos/video-channels.ts | 5 | ||||
-rw-r--r-- | server/tests/api/videos/video-nsfw.ts | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts index 35c418f7c..7ae505fd7 100644 --- a/server/tests/api/videos/video-channels.ts +++ b/server/tests/api/videos/video-channels.ts | |||
@@ -17,7 +17,6 @@ import { | |||
17 | setAccessTokensToServers, | 17 | setAccessTokensToServers, |
18 | updateVideoChannel | 18 | updateVideoChannel |
19 | } from '../../utils/index' | 19 | } from '../../utils/index' |
20 | import { getAccountsList } from '../../utils/users/accounts' | ||
21 | 20 | ||
22 | const expect = chai.expect | 21 | const expect = chai.expect |
23 | 22 | ||
@@ -99,7 +98,7 @@ describe('Test video channels', function () { | |||
99 | }) | 98 | }) |
100 | 99 | ||
101 | it('Should have two video channels when getting account channels on server 1', async function () { | 100 | it('Should have two video channels when getting account channels on server 1', async function () { |
102 | const res = await getAccountVideoChannelsList(servers[0].url, userInfo.account.uuid) | 101 | const res = await getAccountVideoChannelsList(servers[0].url, userInfo.account.name + '@' + userInfo.account.host) |
103 | expect(res.body.total).to.equal(2) | 102 | expect(res.body.total).to.equal(2) |
104 | expect(res.body.data).to.be.an('array') | 103 | expect(res.body.data).to.be.an('array') |
105 | expect(res.body.data).to.have.lengthOf(2) | 104 | expect(res.body.data).to.have.lengthOf(2) |
@@ -112,7 +111,7 @@ describe('Test video channels', function () { | |||
112 | }) | 111 | }) |
113 | 112 | ||
114 | it('Should have one video channel when getting account channels on server 2', async function () { | 113 | it('Should have one video channel when getting account channels on server 2', async function () { |
115 | const res = await getAccountVideoChannelsList(servers[1].url, userInfo.account.uuid) | 114 | const res = await getAccountVideoChannelsList(servers[1].url, userInfo.account.name + '@' + userInfo.account.host) |
116 | expect(res.body.total).to.equal(1) | 115 | expect(res.body.total).to.equal(1) |
117 | expect(res.body.data).to.be.an('array') | 116 | expect(res.body.data).to.be.an('array') |
118 | expect(res.body.data).to.have.lengthOf(1) | 117 | expect(res.body.data).to.have.lengthOf(1) |
diff --git a/server/tests/api/videos/video-nsfw.ts b/server/tests/api/videos/video-nsfw.ts index b8c85f45b..a8f152561 100644 --- a/server/tests/api/videos/video-nsfw.ts +++ b/server/tests/api/videos/video-nsfw.ts | |||
@@ -32,13 +32,13 @@ describe('Test video NSFW policy', function () { | |||
32 | .then(res => { | 32 | .then(res => { |
33 | const user: User = res.body | 33 | const user: User = res.body |
34 | const videoChannelUUID = user.videoChannels[0].uuid | 34 | const videoChannelUUID = user.videoChannels[0].uuid |
35 | const accountUUID = user.account.uuid | 35 | const accountName = user.account.name + '@' + user.account.host |
36 | 36 | ||
37 | if (token) { | 37 | if (token) { |
38 | return Promise.all([ | 38 | return Promise.all([ |
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, accountName, 0, 5), |
42 | getVideoChannelVideos(server.url, token, videoChannelUUID, 0, 5) | 42 | getVideoChannelVideos(server.url, token, videoChannelUUID, 0, 5) |
43 | ]) | 43 | ]) |
44 | } | 44 | } |
@@ -46,7 +46,7 @@ describe('Test video NSFW policy', function () { | |||
46 | return Promise.all([ | 46 | return Promise.all([ |
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, accountName, 0, 5), |
50 | getVideoChannelVideos(server.url, undefined, videoChannelUUID, 0, 5) | 50 | getVideoChannelVideos(server.url, undefined, videoChannelUUID, 0, 5) |
51 | ]) | 51 | ]) |
52 | }) | 52 | }) |