aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/server/bulk.ts13
1 files changed, 7 insertions, 6 deletions
diff --git a/server/tests/api/server/bulk.ts b/server/tests/api/server/bulk.ts
index 80fa7fce6..ca98a2eb2 100644
--- a/server/tests/api/server/bulk.ts
+++ b/server/tests/api/server/bulk.ts
@@ -6,7 +6,7 @@ import { Video, VideoComment } from '@shared/models'
6import { 6import {
7 addVideoCommentReply, 7 addVideoCommentReply,
8 addVideoCommentThread, 8 addVideoCommentThread,
9 bulkRemoveCommentsOf, 9 BulkCommand,
10 cleanupTests, 10 cleanupTests,
11 createUser, 11 createUser,
12 doubleFollow, 12 doubleFollow,
@@ -30,6 +30,8 @@ describe('Test bulk actions', function () {
30 let user2AccessToken: string 30 let user2AccessToken: string
31 let user3AccessToken: string 31 let user3AccessToken: string
32 32
33 let bulkCommand: BulkCommand
34
33 before(async function () { 35 before(async function () {
34 this.timeout(30000) 36 this.timeout(30000)
35 37
@@ -60,6 +62,8 @@ describe('Test bulk actions', function () {
60 } 62 }
61 63
62 await doubleFollow(servers[0], servers[1]) 64 await doubleFollow(servers[0], servers[1])
65
66 bulkCommand = new BulkCommand(servers[0])
63 }) 67 })
64 68
65 describe('Bulk remove comments', function () { 69 describe('Bulk remove comments', function () {
@@ -133,8 +137,7 @@ describe('Test bulk actions', function () {
133 it('Should delete comments of an account on my videos', async function () { 137 it('Should delete comments of an account on my videos', async function () {
134 this.timeout(60000) 138 this.timeout(60000)
135 139
136 await bulkRemoveCommentsOf({ 140 await bulkCommand.removeCommentsOf({
137 url: servers[0].url,
138 token: user1AccessToken, 141 token: user1AccessToken,
139 attributes: { 142 attributes: {
140 accountName: 'user2', 143 accountName: 'user2',
@@ -164,9 +167,7 @@ describe('Test bulk actions', function () {
164 it('Should delete comments of an account on the instance', async function () { 167 it('Should delete comments of an account on the instance', async function () {
165 this.timeout(60000) 168 this.timeout(60000)
166 169
167 await bulkRemoveCommentsOf({ 170 await bulkCommand.removeCommentsOf({
168 url: servers[0].url,
169 token: servers[0].accessToken,
170 attributes: { 171 attributes: {
171 accountName: 'user3@localhost:' + servers[1].port, 172 accountName: 'user3@localhost:' + servers[1].port,
172 scope: 'instance' 173 scope: 'instance'