aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/moderation/blocklist-notification.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-13 14:23:01 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0 (patch)
tree7a166515e4d57a06eb3c08be569f106ed049988b /server/tests/api/moderation/blocklist-notification.ts
parentd0a0fa429d4651710ed951a3c11af0219e408964 (diff)
downloadPeerTube-7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0.tar.gz
PeerTube-7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0.tar.zst
PeerTube-7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0.zip
Introduce user command
Diffstat (limited to 'server/tests/api/moderation/blocklist-notification.ts')
-rw-r--r--server/tests/api/moderation/blocklist-notification.ts9
1 files changed, 3 insertions, 6 deletions
diff --git a/server/tests/api/moderation/blocklist-notification.ts b/server/tests/api/moderation/blocklist-notification.ts
index 4f2be6198..b44bcb012 100644
--- a/server/tests/api/moderation/blocklist-notification.ts
+++ b/server/tests/api/moderation/blocklist-notification.ts
@@ -4,7 +4,6 @@ import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { 5import {
6 cleanupTests, 6 cleanupTests,
7 createUser,
8 doubleFollow, 7 doubleFollow,
9 flushAndRunMultipleServers, 8 flushAndRunMultipleServers,
10 ServerInfo, 9 ServerInfo,
@@ -76,9 +75,7 @@ describe('Test blocklist', function () {
76 75
77 { 76 {
78 const user = { username: 'user1', password: 'password' } 77 const user = { username: 'user1', password: 'password' }
79 await createUser({ 78 await servers[0].usersCommand.create({
80 url: servers[0].url,
81 accessToken: servers[0].accessToken,
82 username: user.username, 79 username: user.username,
83 password: user.password, 80 password: user.password,
84 videoQuota: -1, 81 videoQuota: -1,
@@ -91,14 +88,14 @@ describe('Test blocklist', function () {
91 88
92 { 89 {
93 const user = { username: 'user2', password: 'password' } 90 const user = { username: 'user2', password: 'password' }
94 await createUser({ url: servers[0].url, accessToken: servers[0].accessToken, username: user.username, password: user.password }) 91 await servers[0].usersCommand.create({ username: user.username, password: user.password })
95 92
96 userToken2 = await servers[0].loginCommand.getAccessToken(user) 93 userToken2 = await servers[0].loginCommand.getAccessToken(user)
97 } 94 }
98 95
99 { 96 {
100 const user = { username: 'user3', password: 'password' } 97 const user = { username: 'user3', password: 'password' }
101 await createUser({ url: servers[1].url, accessToken: servers[1].accessToken, username: user.username, password: user.password }) 98 await servers[1].usersCommand.create({ username: user.username, password: user.password })
102 99
103 remoteUserToken = await servers[1].loginCommand.getAccessToken(user) 100 remoteUserToken = await servers[1].loginCommand.getAccessToken(user)
104 } 101 }