aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-22 11:27:40 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:53 +0100
commitc46edbc2f6ca310b2f0331f979ac6caf27f6eb92 (patch)
tree073e32adb1bf93a597a269432e33a8f28365deb5 /server/tests/api
parentc986175d68a18e96fbd41537a05c7796a2c64f38 (diff)
downloadPeerTube-c46edbc2f6ca310b2f0331f979ac6caf27f6eb92.tar.gz
PeerTube-c46edbc2f6ca310b2f0331f979ac6caf27f6eb92.tar.zst
PeerTube-c46edbc2f6ca310b2f0331f979ac6caf27f6eb92.zip
Fetch outbox to grab old activities tests
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/follows.ts30
1 files changed, 29 insertions, 1 deletions
diff --git a/server/tests/api/follows.ts b/server/tests/api/follows.ts
index b2f53d3a7..875d814a7 100644
--- a/server/tests/api/follows.ts
+++ b/server/tests/api/follows.ts
@@ -22,7 +22,7 @@ describe('Test follows', function () {
22 let server3Id: number 22 let server3Id: number
23 23
24 before(async function () { 24 before(async function () {
25 this.timeout(120000) 25 this.timeout(20000)
26 26
27 servers = await flushAndRunMultipleServers(3) 27 servers = await flushAndRunMultipleServers(3)
28 28
@@ -163,6 +163,34 @@ describe('Test follows', function () {
163 expect(res.body.data[0].name).to.equal('server3') 163 expect(res.body.data[0].name).to.equal('server3')
164 }) 164 })
165 165
166 it('Should propagate previous uploaded videos on a new following', async function () {
167 this.timeout(20000)
168
169 await uploadVideo(servers[2].url, servers[2].accessToken, { name: 'server3-2' })
170 await uploadVideo(servers[2].url, servers[2].accessToken, { name: 'server3-3' })
171 await uploadVideo(servers[2].url, servers[2].accessToken, { name: 'server3-4' })
172 await uploadVideo(servers[2].url, servers[2].accessToken, { name: 'server3-5' })
173 await uploadVideo(servers[2].url, servers[2].accessToken, { name: 'server3-6' })
174
175 await wait(5000)
176
177 // Server 1 follows server 3
178 await follow(servers[0].url, [ servers[2].url ], servers[0].accessToken)
179
180 await wait(7000)
181
182 let res = await getVideosList(servers[0].url)
183 expect(res.body.total).to.equal(7)
184
185 const video2 = res.body.data.find(v => v.name === 'server3-2')
186 const video4 = res.body.data.find(v => v.name === 'server3-4')
187 const video6 = res.body.data.find(v => v.name === 'server3-6')
188
189 expect(video2).to.not.be.undefined
190 expect(video4).to.not.be.undefined
191 expect(video6).to.not.be.undefined
192 })
193
166 after(async function () { 194 after(async function () {
167 killallServers(servers) 195 killallServers(servers)
168 196