})
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)
})
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)
})
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)
})
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)
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)
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)
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)
})
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)
})
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)
})
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)
})
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)