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.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/tests/cli/peertube.ts b/server/tests/cli/peertube.ts
index ef7ab5bd5..5ab07edb0 100644
--- a/server/tests/cli/peertube.ts
+++ b/server/tests/cli/peertube.ts
@@ -12,6 +12,7 @@ import {
12 doubleFollow, 12 doubleFollow,
13 flushAndRunServer, 13 flushAndRunServer,
14 getLocalIdByUUID, 14 getLocalIdByUUID,
15 getMyUserInformation,
15 getVideo, 16 getVideo,
16 getVideosList, 17 getVideosList,
17 ImportsCommand, 18 ImportsCommand,
@@ -52,6 +53,14 @@ describe('Test CLI wrapper', function () {
52 53
53 describe('Authentication and instance selection', function () { 54 describe('Authentication and instance selection', function () {
54 55
56 it('Should get an access token', async function () {
57 const stdout = await cliCommand.execWithEnv(`${cmd} token --url ${server.url} --username user_1 --password super_password`)
58 const token = stdout.trim()
59
60 const res = await getMyUserInformation(server.url, token)
61 expect(res.body.username).to.equal('user_1')
62 })
63
55 it('Should display no selected instance', async function () { 64 it('Should display no selected instance', async function () {
56 this.timeout(60000) 65 this.timeout(60000)
57 66