diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-13 14:23:01 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | 7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0 (patch) | |
tree | 7a166515e4d57a06eb3c08be569f106ed049988b /server/tests/api/check-params/abuses.ts | |
parent | d0a0fa429d4651710ed951a3c11af0219e408964 (diff) | |
download | PeerTube-7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0.tar.gz PeerTube-7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0.tar.zst PeerTube-7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0.zip |
Introduce user command
Diffstat (limited to 'server/tests/api/check-params/abuses.ts')
-rw-r--r-- | server/tests/api/check-params/abuses.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/server/tests/api/check-params/abuses.ts b/server/tests/api/check-params/abuses.ts index 14949d301..4cd10a6fd 100644 --- a/server/tests/api/check-params/abuses.ts +++ b/server/tests/api/check-params/abuses.ts | |||
@@ -8,10 +8,8 @@ import { | |||
8 | checkBadSortPagination, | 8 | checkBadSortPagination, |
9 | checkBadStartPagination, | 9 | checkBadStartPagination, |
10 | cleanupTests, | 10 | cleanupTests, |
11 | createUser, | ||
12 | doubleFollow, | 11 | doubleFollow, |
13 | flushAndRunServer, | 12 | flushAndRunServer, |
14 | generateUserAccessToken, | ||
15 | getVideoIdFromUUID, | 13 | getVideoIdFromUUID, |
16 | makeGetRequest, | 14 | makeGetRequest, |
17 | makePostBodyRequest, | 15 | makePostBodyRequest, |
@@ -45,10 +43,10 @@ describe('Test abuses API validators', function () { | |||
45 | 43 | ||
46 | const username = 'user1' | 44 | const username = 'user1' |
47 | const password = 'my super password' | 45 | const password = 'my super password' |
48 | await createUser({ url: server.url, accessToken: server.accessToken, username: username, password: password }) | 46 | await server.usersCommand.create({ username: username, password: password }) |
49 | userToken = await server.loginCommand.getAccessToken({ username, password }) | 47 | userToken = await server.loginCommand.getAccessToken({ username, password }) |
50 | 48 | ||
51 | userToken2 = await generateUserAccessToken(server, 'user_2') | 49 | userToken2 = await server.usersCommand.generateUserAndToken('user_2') |
52 | 50 | ||
53 | const res = await uploadVideo(server.url, server.accessToken, {}) | 51 | const res = await uploadVideo(server.url, server.accessToken, {}) |
54 | server.video = res.body.video | 52 | server.video = res.body.video |