X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fusers%2Fusers.ts;h=9d2ef786f1da14303ce6f43fd6ca3146f81053d3;hb=e590b4a512617bbf63595b684386f68abea7d8b8;hp=c1a24b8387598d9276a3d74649eb6c73d9165a52;hpb=1600235a2f4e30c5d4e7d4342d1c299845decc60;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts index c1a24b838..9d2ef786f 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts @@ -31,7 +31,8 @@ import { updateMyUser, updateUser, uploadVideo, - userLogin + userLogin, + registerUserWithChannel, getVideoChannel } from '../../../../shared/extra-utils' import { follow } from '../../../../shared/extra-utils/server/follows' import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login' @@ -617,7 +618,10 @@ describe('Test users', function () { describe('Registering a new user', function () { it('Should register a new user', async function () { - await registerUser(server.url, 'user_15', 'my super password') + const user = { username: 'user_15', password: 'my super password' } + const channel = { name: 'my_user_15_channel', displayName: 'my channel rocks' } + + await registerUserWithChannel({ url: server.url, user, channel }) }) it('Should be able to login with this registered user', async function () { @@ -636,6 +640,12 @@ describe('Test users', function () { expect(user.videoQuota).to.equal(5 * 1024 * 1024) }) + it('Should have created the channel', async function () { + const res = await getVideoChannel(server.url, 'my_user_15_channel') + + expect(res.body.displayName).to.equal('my channel rocks') + }) + it('Should remove me', async function () { { const res = await getUsersList(server.url, server.accessToken)