diff options
Diffstat (limited to 'server/tests/api/users/users.ts')
-rw-r--r-- | server/tests/api/users/users.ts | 14 |
1 files changed, 12 insertions, 2 deletions
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 { | |||
31 | updateMyUser, | 31 | updateMyUser, |
32 | updateUser, | 32 | updateUser, |
33 | uploadVideo, | 33 | uploadVideo, |
34 | userLogin | 34 | userLogin, |
35 | registerUserWithChannel, getVideoChannel | ||
35 | } from '../../../../shared/extra-utils' | 36 | } from '../../../../shared/extra-utils' |
36 | import { follow } from '../../../../shared/extra-utils/server/follows' | 37 | import { follow } from '../../../../shared/extra-utils/server/follows' |
37 | import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login' | 38 | import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login' |
@@ -617,7 +618,10 @@ describe('Test users', function () { | |||
617 | 618 | ||
618 | describe('Registering a new user', function () { | 619 | describe('Registering a new user', function () { |
619 | it('Should register a new user', async function () { | 620 | it('Should register a new user', async function () { |
620 | await registerUser(server.url, 'user_15', 'my super password') | 621 | const user = { username: 'user_15', password: 'my super password' } |
622 | const channel = { name: 'my_user_15_channel', displayName: 'my channel rocks' } | ||
623 | |||
624 | await registerUserWithChannel({ url: server.url, user, channel }) | ||
621 | }) | 625 | }) |
622 | 626 | ||
623 | it('Should be able to login with this registered user', async function () { | 627 | it('Should be able to login with this registered user', async function () { |
@@ -636,6 +640,12 @@ describe('Test users', function () { | |||
636 | expect(user.videoQuota).to.equal(5 * 1024 * 1024) | 640 | expect(user.videoQuota).to.equal(5 * 1024 * 1024) |
637 | }) | 641 | }) |
638 | 642 | ||
643 | it('Should have created the channel', async function () { | ||
644 | const res = await getVideoChannel(server.url, 'my_user_15_channel') | ||
645 | |||
646 | expect(res.body.displayName).to.equal('my channel rocks') | ||
647 | }) | ||
648 | |||
639 | it('Should remove me', async function () { | 649 | it('Should remove me', async function () { |
640 | { | 650 | { |
641 | const res = await getUsersList(server.url, server.accessToken) | 651 | const res = await getUsersList(server.url, server.accessToken) |