aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/cli/peertube.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/cli/peertube.ts')
-rw-r--r--server/tests/cli/peertube.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/server/tests/cli/peertube.ts b/server/tests/cli/peertube.ts
index e055b4684..a0c149ac0 100644
--- a/server/tests/cli/peertube.ts
+++ b/server/tests/cli/peertube.ts
@@ -8,11 +8,9 @@ import {
8 buildAbsoluteFixturePath, 8 buildAbsoluteFixturePath,
9 cleanupTests, 9 cleanupTests,
10 CLICommand, 10 CLICommand,
11 createUser,
12 doubleFollow, 11 doubleFollow,
13 flushAndRunServer, 12 flushAndRunServer,
14 getLocalIdByUUID, 13 getLocalIdByUUID,
15 getMyUserInformation,
16 getVideo, 14 getVideo,
17 getVideosList, 15 getVideosList,
18 ImportsCommand, 16 ImportsCommand,
@@ -38,7 +36,7 @@ describe('Test CLI wrapper', function () {
38 server = await flushAndRunServer(1) 36 server = await flushAndRunServer(1)
39 await setAccessTokensToServers([ server ]) 37 await setAccessTokensToServers([ server ])
40 38
41 await createUser({ url: server.url, accessToken: server.accessToken, username: 'user_1', password: 'super_password' }) 39 await server.usersCommand.create({ username: 'user_1', password: 'super_password' })
42 40
43 userAccessToken = await server.loginCommand.getAccessToken({ username: 'user_1', password: 'super_password' }) 41 userAccessToken = await server.loginCommand.getAccessToken({ username: 'user_1', password: 'super_password' })
44 42
@@ -56,8 +54,8 @@ describe('Test CLI wrapper', function () {
56 const stdout = await cliCommand.execWithEnv(`${cmd} token --url ${server.url} --username user_1 --password super_password`) 54 const stdout = await cliCommand.execWithEnv(`${cmd} token --url ${server.url} --username user_1 --password super_password`)
57 const token = stdout.trim() 55 const token = stdout.trim()
58 56
59 const res = await getMyUserInformation(server.url, token) 57 const body = await server.usersCommand.getMyInfo({ token })
60 expect(res.body.username).to.equal('user_1') 58 expect(body.username).to.equal('user_1')
61 }) 59 })
62 60
63 it('Should display no selected instance', async function () { 61 it('Should display no selected instance', async function () {