aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/activitypub/fetch.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 09:04:35 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit89d241a79c262b9775c233b73cff080043ebb5e6 (patch)
treecb3b6cb431d25d891ef4e02f66c61d252d17048f /server/tests/api/activitypub/fetch.ts
parentd23dd9fbfc4d26026352c10f81d2795ceaf2908a (diff)
downloadPeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.gz
PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.zst
PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.zip
Shorter server command names
Diffstat (limited to 'server/tests/api/activitypub/fetch.ts')
-rw-r--r--server/tests/api/activitypub/fetch.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/server/tests/api/activitypub/fetch.ts b/server/tests/api/activitypub/fetch.ts
index 5ab4a85d7..34694a773 100644
--- a/server/tests/api/activitypub/fetch.ts
+++ b/server/tests/api/activitypub/fetch.ts
@@ -21,24 +21,24 @@ describe('Test ActivityPub fetcher', function () {
21 21
22 const user = { username: 'user1', password: 'password' } 22 const user = { username: 'user1', password: 'password' }
23 for (const server of servers) { 23 for (const server of servers) {
24 await server.usersCommand.create({ username: user.username, password: user.password }) 24 await server.users.create({ username: user.username, password: user.password })
25 } 25 }
26 26
27 const userAccessToken = await servers[0].loginCommand.getAccessToken(user) 27 const userAccessToken = await servers[0].login.getAccessToken(user)
28 28
29 await servers[0].videosCommand.upload({ attributes: { name: 'video root' } }) 29 await servers[0].videos.upload({ attributes: { name: 'video root' } })
30 const { uuid } = await servers[0].videosCommand.upload({ attributes: { name: 'bad video root' } }) 30 const { uuid } = await servers[0].videos.upload({ attributes: { name: 'bad video root' } })
31 await servers[0].videosCommand.upload({ token: userAccessToken, attributes: { name: 'video user' } }) 31 await servers[0].videos.upload({ token: userAccessToken, attributes: { name: 'video user' } })
32 32
33 { 33 {
34 const to = 'http://localhost:' + servers[0].port + '/accounts/user1' 34 const to = 'http://localhost:' + servers[0].port + '/accounts/user1'
35 const value = 'http://localhost:' + servers[1].port + '/accounts/user1' 35 const value = 'http://localhost:' + servers[1].port + '/accounts/user1'
36 await servers[0].sqlCommand.setActorField(to, 'url', value) 36 await servers[0].sql.setActorField(to, 'url', value)
37 } 37 }
38 38
39 { 39 {
40 const value = 'http://localhost:' + servers[2].port + '/videos/watch/' + uuid 40 const value = 'http://localhost:' + servers[2].port + '/videos/watch/' + uuid
41 await servers[0].sqlCommand.setVideoField(uuid, 'url', value) 41 await servers[0].sql.setVideoField(uuid, 'url', value)
42 } 42 }
43 }) 43 })
44 44
@@ -49,7 +49,7 @@ describe('Test ActivityPub fetcher', function () {
49 await waitJobs(servers) 49 await waitJobs(servers)
50 50
51 { 51 {
52 const { total, data } = await servers[0].videosCommand.list({ sort: 'createdAt' }) 52 const { total, data } = await servers[0].videos.list({ sort: 'createdAt' })
53 53
54 expect(total).to.equal(3) 54 expect(total).to.equal(3)
55 expect(data[0].name).to.equal('video root') 55 expect(data[0].name).to.equal('video root')
@@ -58,7 +58,7 @@ describe('Test ActivityPub fetcher', function () {
58 } 58 }
59 59
60 { 60 {
61 const { total, data } = await servers[1].videosCommand.list({ sort: 'createdAt' }) 61 const { total, data } = await servers[1].videos.list({ sort: 'createdAt' })
62 62
63 expect(total).to.equal(1) 63 expect(total).to.equal(1)
64 expect(data[0].name).to.equal('video root') 64 expect(data[0].name).to.equal('video root')