diff options
Diffstat (limited to 'server/tests/api/users')
-rw-r--r-- | server/tests/api/users/users.ts | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts index 9d2ef786f..b1f214fe2 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts | |||
@@ -17,11 +17,12 @@ import { | |||
17 | getUserInformation, | 17 | getUserInformation, |
18 | getUsersList, | 18 | getUsersList, |
19 | getUsersListPaginationAndSort, | 19 | getUsersListPaginationAndSort, |
20 | getVideoChannel, | ||
20 | getVideosList, | 21 | getVideosList, |
21 | login, | 22 | login, |
22 | makePutBodyRequest, | 23 | makePutBodyRequest, |
23 | rateVideo, | 24 | rateVideo, |
24 | registerUser, | 25 | registerUserWithChannel, |
25 | removeUser, | 26 | removeUser, |
26 | removeVideo, | 27 | removeVideo, |
27 | ServerInfo, | 28 | ServerInfo, |
@@ -31,8 +32,7 @@ import { | |||
31 | updateMyUser, | 32 | updateMyUser, |
32 | updateUser, | 33 | updateUser, |
33 | uploadVideo, | 34 | uploadVideo, |
34 | userLogin, | 35 | userLogin |
35 | registerUserWithChannel, getVideoChannel | ||
36 | } from '../../../../shared/extra-utils' | 36 | } from '../../../../shared/extra-utils' |
37 | import { follow } from '../../../../shared/extra-utils/server/follows' | 37 | import { follow } from '../../../../shared/extra-utils/server/follows' |
38 | import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login' | 38 | import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login' |
@@ -618,7 +618,7 @@ describe('Test users', function () { | |||
618 | 618 | ||
619 | describe('Registering a new user', function () { | 619 | describe('Registering a new user', function () { |
620 | it('Should register a new user', async function () { | 620 | it('Should register a new user', async function () { |
621 | const user = { username: 'user_15', password: 'my super password' } | 621 | const user = { displayName: 'super user 15', username: 'user_15', password: 'my super password' } |
622 | const channel = { name: 'my_user_15_channel', displayName: 'my channel rocks' } | 622 | const channel = { name: 'my_user_15_channel', displayName: 'my channel rocks' } |
623 | 623 | ||
624 | await registerUserWithChannel({ url: server.url, user, channel }) | 624 | await registerUserWithChannel({ url: server.url, user, channel }) |
@@ -633,6 +633,13 @@ describe('Test users', function () { | |||
633 | accessToken = await userLogin(server, user15) | 633 | accessToken = await userLogin(server, user15) |
634 | }) | 634 | }) |
635 | 635 | ||
636 | it('Should have the correct display name', async function () { | ||
637 | const res = await getMyUserInformation(server.url, accessToken) | ||
638 | const user: User = res.body | ||
639 | |||
640 | expect(user.account.displayName).to.equal('super user 15') | ||
641 | }) | ||
642 | |||
636 | it('Should have the correct video quota', async function () { | 643 | it('Should have the correct video quota', async function () { |
637 | const res = await getMyUserInformation(server.url, accessToken) | 644 | const res = await getMyUserInformation(server.url, accessToken) |
638 | const user = res.body | 645 | const user = res.body |