X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fvideo-abuse.ts;h=baeb543e0b939ec0b8b33948253f49685f8b8d0c;hb=4f32032fed8587ea97d45e235b167e8958efd81f;hp=20975aa4ac4f8acb31b9e5775dae86c90beadfc3;hpb=d95d15598847c7f020aa056e7e6e0c02d2bbf732;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/video-abuse.ts b/server/tests/api/videos/video-abuse.ts index 20975aa4a..baeb543e0 100644 --- a/server/tests/api/videos/video-abuse.ts +++ b/server/tests/api/videos/video-abuse.ts @@ -103,8 +103,8 @@ describe('Test video abuses', function () { expect(abuse.reporterAccount.host).to.equal('localhost:' + servers[0].port) expect(abuse.video.id).to.equal(servers[0].video.id) expect(abuse.video.channel).to.exist - expect(abuse.count).to.equal(1) - expect(abuse.nth).to.equal(1) + expect(abuse.video.countReports).to.equal(1) + expect(abuse.video.nthReport).to.equal(1) expect(abuse.countReportsForReporter).to.equal(1) expect(abuse.countReportsForReportee).to.equal(1) @@ -138,8 +138,8 @@ describe('Test video abuses', function () { expect(abuse1.state.id).to.equal(AbuseState.PENDING) expect(abuse1.state.label).to.equal('Pending') expect(abuse1.moderationComment).to.be.null - expect(abuse1.count).to.equal(1) - expect(abuse1.nth).to.equal(1) + expect(abuse1.video.countReports).to.equal(1) + expect(abuse1.video.nthReport).to.equal(1) const abuse2: Abuse = res1.body.data[1] expect(abuse2.reason).to.equal('my super bad reason 2') @@ -281,8 +281,8 @@ describe('Test video abuses', function () { { for (const abuse of res2.body.data as Abuse[]) { if (abuse.video.id === video3.id) { - expect(abuse.count).to.equal(1, "wrong reports count for video 3") - expect(abuse.nth).to.equal(1, "wrong report position in report list for video 3") + expect(abuse.video.countReports).to.equal(1, "wrong reports count for video 3") + expect(abuse.video.nthReport).to.equal(1, "wrong report position in report list for video 3") expect(abuse.countReportsForReportee).to.equal(1, "wrong reports count for reporter on video 3 abuse") expect(abuse.countReportsForReporter).to.equal(3, "wrong reports count for reportee on video 3 abuse") }