mirror of https://github.com/Chocobozzz/PeerTube
Fix tests
parent
5bdc34195c
commit
84992f5606
|
@ -430,7 +430,7 @@ describe('Test video channels', function () {
|
||||||
expect(body.data[1].displayName).to.equal('video channel updated')
|
expect(body.data[1].displayName).to.equal('video channel updated')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should create the main channel with an uuid if there is a conflict', async function () {
|
it('Should create the main channel with a suffix if there is a conflict', async function () {
|
||||||
{
|
{
|
||||||
const videoChannel = { name: 'toto_channel', displayName: 'My toto channel' }
|
const videoChannel = { name: 'toto_channel', displayName: 'My toto channel' }
|
||||||
const created = await servers[0].channels.create({ attributes: videoChannel })
|
const created = await servers[0].channels.create({ attributes: videoChannel })
|
||||||
|
@ -442,8 +442,7 @@ describe('Test video channels', function () {
|
||||||
const accessToken = await servers[0].login.getAccessToken({ username: 'toto', password: 'password' })
|
const accessToken = await servers[0].login.getAccessToken({ username: 'toto', password: 'password' })
|
||||||
|
|
||||||
const { videoChannels } = await servers[0].users.getMyInfo({ token: accessToken })
|
const { videoChannels } = await servers[0].users.getMyInfo({ token: accessToken })
|
||||||
const videoChannel = videoChannels[0]
|
expect(videoChannels[0].name).to.equal('toto_channel-1')
|
||||||
expect(videoChannel.name).to.match(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ async function register ({
|
||||||
login (body) {
|
login (body) {
|
||||||
if (body.id === 'ward') {
|
if (body.id === 'ward') {
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
username: 'ward-42',
|
username: '-ward-42',
|
||||||
email: 'ward@example.com'
|
email: 'ward@example.com'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue