diff options
Diffstat (limited to 'server/tests/api/moderation')
-rw-r--r-- | server/tests/api/moderation/abuses.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/server/tests/api/moderation/abuses.ts b/server/tests/api/moderation/abuses.ts index 568fbefcf..0a656b41f 100644 --- a/server/tests/api/moderation/abuses.ts +++ b/server/tests/api/moderation/abuses.ts | |||
@@ -260,12 +260,12 @@ describe('Test abuses', function () { | |||
260 | await waitJobs(servers) | 260 | await waitJobs(servers) |
261 | 261 | ||
262 | const body = await commands[1].getAdminList() | 262 | const body = await commands[1].getAdminList() |
263 | expect(body.total).to.equal(2, "wrong number of videos returned") | 263 | expect(body.total).to.equal(2, 'wrong number of videos returned') |
264 | expect(body.data).to.have.lengthOf(2, "wrong number of videos returned") | 264 | expect(body.data).to.have.lengthOf(2, 'wrong number of videos returned') |
265 | 265 | ||
266 | const abuse = body.data[0] | 266 | const abuse = body.data[0] |
267 | expect(abuse.id).to.equal(abuseServer2.id, "wrong origin server id for first video") | 267 | expect(abuse.id).to.equal(abuseServer2.id, 'wrong origin server id for first video') |
268 | expect(abuse.video.id).to.equal(abuseServer2.video.id, "wrong video id") | 268 | expect(abuse.video.id).to.equal(abuseServer2.video.id, 'wrong video id') |
269 | expect(abuse.video.channel).to.exist | 269 | expect(abuse.video.channel).to.exist |
270 | expect(abuse.video.deleted).to.be.true | 270 | expect(abuse.video.deleted).to.be.true |
271 | }) | 271 | }) |
@@ -299,13 +299,13 @@ describe('Test abuses', function () { | |||
299 | 299 | ||
300 | const abuseVideo3 = body.data.find(a => a.video.id === video3Id) | 300 | const abuseVideo3 = body.data.find(a => a.video.id === video3Id) |
301 | expect(abuseVideo3).to.not.be.undefined | 301 | expect(abuseVideo3).to.not.be.undefined |
302 | expect(abuseVideo3.video.countReports).to.equal(1, "wrong reports count for video 3") | 302 | expect(abuseVideo3.video.countReports).to.equal(1, 'wrong reports count for video 3') |
303 | expect(abuseVideo3.video.nthReport).to.equal(1, "wrong report position in report list for video 3") | 303 | expect(abuseVideo3.video.nthReport).to.equal(1, 'wrong report position in report list for video 3') |
304 | expect(abuseVideo3.countReportsForReportee).to.equal(1, "wrong reports count for reporter on video 3 abuse") | 304 | expect(abuseVideo3.countReportsForReportee).to.equal(1, 'wrong reports count for reporter on video 3 abuse') |
305 | expect(abuseVideo3.countReportsForReporter).to.equal(3, "wrong reports count for reportee on video 3 abuse") | 305 | expect(abuseVideo3.countReportsForReporter).to.equal(3, 'wrong reports count for reportee on video 3 abuse') |
306 | 306 | ||
307 | const abuseServer1 = abuses.find(a => a.video.id === servers[0].store.videoCreated.id) | 307 | const abuseServer1 = abuses.find(a => a.video.id === servers[0].store.videoCreated.id) |
308 | expect(abuseServer1.countReportsForReportee).to.equal(3, "wrong reports count for reporter on video 1 abuse") | 308 | expect(abuseServer1.countReportsForReportee).to.equal(3, 'wrong reports count for reporter on video 1 abuse') |
309 | } | 309 | } |
310 | }) | 310 | }) |
311 | 311 | ||
@@ -327,7 +327,7 @@ describe('Test abuses', function () { | |||
327 | { | 327 | { |
328 | const abuse = body.data.find(a => a.id === createRes.abuse.id) | 328 | const abuse = body.data.find(a => a.id === createRes.abuse.id) |
329 | expect(abuse.reason).to.equals(reason5) | 329 | expect(abuse.reason).to.equals(reason5) |
330 | expect(abuse.predefinedReasons).to.deep.equals(predefinedReasons5, "predefined reasons do not match the one reported") | 330 | expect(abuse.predefinedReasons).to.deep.equals(predefinedReasons5, 'predefined reasons do not match the one reported') |
331 | expect(abuse.video.startAt).to.equal(1, "starting timestamp doesn't match the one reported") | 331 | expect(abuse.video.startAt).to.equal(1, "starting timestamp doesn't match the one reported") |
332 | expect(abuse.video.endAt).to.equal(5, "ending timestamp doesn't match the one reported") | 332 | expect(abuse.video.endAt).to.equal(5, "ending timestamp doesn't match the one reported") |
333 | } | 333 | } |