]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/video-abuse.ts
Add migrations
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / video-abuse.ts
index 20975aa4ac4f8acb31b9e5775dae86c90beadfc3..baeb543e0b939ec0b8b33948253f49685f8b8d0c 100644 (file)
@@ -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")
         }