diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-13 11:05:15 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | 41d1d075011174e73dccb74006181a92a618d7b4 (patch) | |
tree | 4dc1af0e266977f062cf9716837d04de1cdd628d /server/tests/cli/reset-password.ts | |
parent | 6c5065a011b099618681a37bd77eaa7bd3db752e (diff) | |
download | PeerTube-41d1d075011174e73dccb74006181a92a618d7b4.tar.gz PeerTube-41d1d075011174e73dccb74006181a92a618d7b4.tar.zst PeerTube-41d1d075011174e73dccb74006181a92a618d7b4.zip |
Introduce login command
Diffstat (limited to 'server/tests/cli/reset-password.ts')
-rw-r--r-- | server/tests/cli/reset-password.ts | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/server/tests/cli/reset-password.ts b/server/tests/cli/reset-password.ts index 97a6eae15..a5f958bf7 100644 --- a/server/tests/cli/reset-password.ts +++ b/server/tests/cli/reset-password.ts | |||
@@ -1,14 +1,5 @@ | |||
1 | import 'mocha' | 1 | import 'mocha' |
2 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | 2 | import { cleanupTests, CLICommand, createUser, flushAndRunServer, ServerInfo, setAccessTokensToServers } from '../../../shared/extra-utils' |
3 | import { | ||
4 | cleanupTests, | ||
5 | CLICommand, | ||
6 | createUser, | ||
7 | flushAndRunServer, | ||
8 | login, | ||
9 | ServerInfo, | ||
10 | setAccessTokensToServers | ||
11 | } from '../../../shared/extra-utils' | ||
12 | 3 | ||
13 | describe('Test reset password scripts', function () { | 4 | describe('Test reset password scripts', function () { |
14 | let server: ServerInfo | 5 | let server: ServerInfo |
@@ -27,7 +18,7 @@ describe('Test reset password scripts', function () { | |||
27 | const env = server.cliCommand.getEnv() | 18 | const env = server.cliCommand.getEnv() |
28 | await CLICommand.exec(`echo coucou | ${env} npm run reset-password -- -u user_1`) | 19 | await CLICommand.exec(`echo coucou | ${env} npm run reset-password -- -u user_1`) |
29 | 20 | ||
30 | await login(server.url, server.client, { username: 'user_1', password: 'coucou' }, HttpStatusCode.OK_200) | 21 | await server.loginCommand.login({ user: { username: 'user_1', password: 'coucou' } }) |
31 | }) | 22 | }) |
32 | 23 | ||
33 | after(async function () { | 24 | after(async function () { |