]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/server/follow-constraints.ts
Merge branch 'release/5.1.0' into develop
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / follow-constraints.ts
index e1ec2b069baefd4da052a863a4c1d6a42edc9980..704d6fc9615c239ae632b11c6d9bd9d0eaa5792c 100644 (file)
@@ -57,21 +57,21 @@ describe('Test follow constraints', function () {
       })
 
       it('Should list local account videos', async function () {
-        const { total, data } = await servers[0].videos.listByAccount({ handle: 'root@localhost:' + servers[0].port })
+        const { total, data } = await servers[0].videos.listByAccount({ handle: 'root@' + servers[0].host })
 
         expect(total).to.equal(1)
         expect(data).to.have.lengthOf(1)
       })
 
       it('Should list remote account videos', async function () {
-        const { total, data } = await servers[0].videos.listByAccount({ handle: 'root@localhost:' + servers[1].port })
+        const { total, data } = await servers[0].videos.listByAccount({ handle: 'root@' + servers[1].host })
 
         expect(total).to.equal(1)
         expect(data).to.have.lengthOf(1)
       })
 
       it('Should list local channel videos', async function () {
-        const handle = 'root_channel@localhost:' + servers[0].port
+        const handle = 'root_channel@' + servers[0].host
         const { total, data } = await servers[0].videos.listByChannel({ handle })
 
         expect(total).to.equal(1)
@@ -79,7 +79,7 @@ describe('Test follow constraints', function () {
       })
 
       it('Should list remote channel videos', async function () {
-        const handle = 'root_channel@localhost:' + servers[1].port
+        const handle = 'root_channel@' + servers[1].host
         const { total, data } = await servers[0].videos.listByChannel({ handle })
 
         expect(total).to.equal(1)
@@ -97,21 +97,21 @@ describe('Test follow constraints', function () {
       })
 
       it('Should list local account videos', async function () {
-        const { total, data } = await servers[0].videos.listByAccount({ token: userToken, handle: 'root@localhost:' + servers[0].port })
+        const { total, data } = await servers[0].videos.listByAccount({ token: userToken, handle: 'root@' + servers[0].host })
 
         expect(total).to.equal(1)
         expect(data).to.have.lengthOf(1)
       })
 
       it('Should list remote account videos', async function () {
-        const { total, data } = await servers[0].videos.listByAccount({ token: userToken, handle: 'root@localhost:' + servers[1].port })
+        const { total, data } = await servers[0].videos.listByAccount({ token: userToken, handle: 'root@' + servers[1].host })
 
         expect(total).to.equal(1)
         expect(data).to.have.lengthOf(1)
       })
 
       it('Should list local channel videos', async function () {
-        const handle = 'root_channel@localhost:' + servers[0].port
+        const handle = 'root_channel@' + servers[0].host
         const { total, data } = await servers[0].videos.listByChannel({ token: userToken, handle })
 
         expect(total).to.equal(1)
@@ -119,7 +119,7 @@ describe('Test follow constraints', function () {
       })
 
       it('Should list remote channel videos', async function () {
-        const handle = 'root_channel@localhost:' + servers[1].port
+        const handle = 'root_channel@' + servers[1].host
         const { total, data } = await servers[0].videos.listByChannel({ token: userToken, handle })
 
         expect(total).to.equal(1)
@@ -146,7 +146,7 @@ describe('Test follow constraints', function () {
         const body = await servers[0].videos.get({ id: video2UUID, expectedStatus: HttpStatusCode.FORBIDDEN_403 })
         const error = body as unknown as PeerTubeProblemDocument
 
-        const doc = 'https://docs.joinpeertube.org/api-rest-reference.html#section/Errors/does_not_respect_follow_constraints'
+        const doc = 'https://docs.joinpeertube.org/api/rest-reference.html#section/Errors/does_not_respect_follow_constraints'
         expect(error.type).to.equal(doc)
         expect(error.code).to.equal(ServerErrorCode.DOES_NOT_RESPECT_FOLLOW_CONSTRAINTS)
 
@@ -161,7 +161,7 @@ describe('Test follow constraints', function () {
       it('Should list local account videos', async function () {
         const { total, data } = await servers[0].videos.listByAccount({
           token: null,
-          handle: 'root@localhost:' + servers[0].port
+          handle: 'root@' + servers[0].host
         })
 
         expect(total).to.equal(1)
@@ -171,7 +171,7 @@ describe('Test follow constraints', function () {
       it('Should not list remote account videos', async function () {
         const { total, data } = await servers[0].videos.listByAccount({
           token: null,
-          handle: 'root@localhost:' + servers[1].port
+          handle: 'root@' + servers[1].host
         })
 
         expect(total).to.equal(0)
@@ -179,7 +179,7 @@ describe('Test follow constraints', function () {
       })
 
       it('Should list local channel videos', async function () {
-        const handle = 'root_channel@localhost:' + servers[0].port
+        const handle = 'root_channel@' + servers[0].host
         const { total, data } = await servers[0].videos.listByChannel({ token: null, handle })
 
         expect(total).to.equal(1)
@@ -187,7 +187,7 @@ describe('Test follow constraints', function () {
       })
 
       it('Should not list remote channel videos', async function () {
-        const handle = 'root_channel@localhost:' + servers[1].port
+        const handle = 'root_channel@' + servers[1].host
         const { total, data } = await servers[0].videos.listByChannel({ token: null, handle })
 
         expect(total).to.equal(0)
@@ -206,21 +206,21 @@ describe('Test follow constraints', function () {
       })
 
       it('Should list local account videos', async function () {
-        const { total, data } = await servers[0].videos.listByAccount({ token: userToken, handle: 'root@localhost:' + servers[0].port })
+        const { total, data } = await servers[0].videos.listByAccount({ token: userToken, handle: 'root@' + servers[0].host })
 
         expect(total).to.equal(1)
         expect(data).to.have.lengthOf(1)
       })
 
       it('Should list remote account videos', async function () {
-        const { total, data } = await servers[0].videos.listByAccount({ token: userToken, handle: 'root@localhost:' + servers[1].port })
+        const { total, data } = await servers[0].videos.listByAccount({ token: userToken, handle: 'root@' + servers[1].host })
 
         expect(total).to.equal(1)
         expect(data).to.have.lengthOf(1)
       })
 
       it('Should list local channel videos', async function () {
-        const handle = 'root_channel@localhost:' + servers[0].port
+        const handle = 'root_channel@' + servers[0].host
         const { total, data } = await servers[0].videos.listByChannel({ token: userToken, handle })
 
         expect(total).to.equal(1)
@@ -228,7 +228,7 @@ describe('Test follow constraints', function () {
       })
 
       it('Should list remote channel videos', async function () {
-        const handle = 'root_channel@localhost:' + servers[1].port
+        const handle = 'root_channel@' + servers[1].host
         const { total, data } = await servers[0].videos.listByChannel({ token: userToken, handle })
 
         expect(total).to.equal(1)