aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/video-abuse.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-25 17:14:49 +0200
committerChocobozzz <me@florianbigard.com>2019-05-14 15:37:43 +0200
commit7243f84db0f34c6d5610a54603b0cce7c284a7b3 (patch)
treec913e9342ec83098bf30c1debd609a15318bc0fb /server/tests/api/videos/video-abuse.ts
parentda3a3ab6829107b3ed7f18dda42648dfde41871d (diff)
downloadPeerTube-7243f84db0f34c6d5610a54603b0cce7c284a7b3.tar.gz
PeerTube-7243f84db0f34c6d5610a54603b0cce7c284a7b3.tar.zst
PeerTube-7243f84db0f34c6d5610a54603b0cce7c284a7b3.zip
Redundancy and search tests in parallel too
Diffstat (limited to 'server/tests/api/videos/video-abuse.ts')
-rw-r--r--server/tests/api/videos/video-abuse.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/server/tests/api/videos/video-abuse.ts b/server/tests/api/videos/video-abuse.ts
index 7318497d5..a2f3ee161 100644
--- a/server/tests/api/videos/video-abuse.ts
+++ b/server/tests/api/videos/video-abuse.ts
@@ -9,7 +9,6 @@ import {
9 flushAndRunMultipleServers, 9 flushAndRunMultipleServers,
10 getVideoAbusesList, 10 getVideoAbusesList,
11 getVideosList, 11 getVideosList,
12 killallServers,
13 reportVideoAbuse, 12 reportVideoAbuse,
14 ServerInfo, 13 ServerInfo,
15 setAccessTokensToServers, 14 setAccessTokensToServers,
@@ -90,7 +89,7 @@ describe('Test video abuses', function () {
90 const abuse: VideoAbuse = res1.body.data[0] 89 const abuse: VideoAbuse = res1.body.data[0]
91 expect(abuse.reason).to.equal('my super bad reason') 90 expect(abuse.reason).to.equal('my super bad reason')
92 expect(abuse.reporterAccount.name).to.equal('root') 91 expect(abuse.reporterAccount.name).to.equal('root')
93 expect(abuse.reporterAccount.host).to.equal('localhost:9001') 92 expect(abuse.reporterAccount.host).to.equal('localhost:' + servers[0].port)
94 expect(abuse.video.id).to.equal(servers[0].video.id) 93 expect(abuse.video.id).to.equal(servers[0].video.id)
95 94
96 const res2 = await getVideoAbusesList(servers[1].url, servers[1].accessToken) 95 const res2 = await getVideoAbusesList(servers[1].url, servers[1].accessToken)
@@ -118,7 +117,7 @@ describe('Test video abuses', function () {
118 const abuse1: VideoAbuse = res1.body.data[0] 117 const abuse1: VideoAbuse = res1.body.data[0]
119 expect(abuse1.reason).to.equal('my super bad reason') 118 expect(abuse1.reason).to.equal('my super bad reason')
120 expect(abuse1.reporterAccount.name).to.equal('root') 119 expect(abuse1.reporterAccount.name).to.equal('root')
121 expect(abuse1.reporterAccount.host).to.equal('localhost:9001') 120 expect(abuse1.reporterAccount.host).to.equal('localhost:' + servers[0].port)
122 expect(abuse1.video.id).to.equal(servers[0].video.id) 121 expect(abuse1.video.id).to.equal(servers[0].video.id)
123 expect(abuse1.state.id).to.equal(VideoAbuseState.PENDING) 122 expect(abuse1.state.id).to.equal(VideoAbuseState.PENDING)
124 expect(abuse1.state.label).to.equal('Pending') 123 expect(abuse1.state.label).to.equal('Pending')
@@ -127,7 +126,7 @@ describe('Test video abuses', function () {
127 const abuse2: VideoAbuse = res1.body.data[1] 126 const abuse2: VideoAbuse = res1.body.data[1]
128 expect(abuse2.reason).to.equal('my super bad reason 2') 127 expect(abuse2.reason).to.equal('my super bad reason 2')
129 expect(abuse2.reporterAccount.name).to.equal('root') 128 expect(abuse2.reporterAccount.name).to.equal('root')
130 expect(abuse2.reporterAccount.host).to.equal('localhost:9001') 129 expect(abuse2.reporterAccount.host).to.equal('localhost:' + servers[0].port)
131 expect(abuse2.video.id).to.equal(servers[1].video.id) 130 expect(abuse2.video.id).to.equal(servers[1].video.id)
132 expect(abuse2.state.id).to.equal(VideoAbuseState.PENDING) 131 expect(abuse2.state.id).to.equal(VideoAbuseState.PENDING)
133 expect(abuse2.state.label).to.equal('Pending') 132 expect(abuse2.state.label).to.equal('Pending')
@@ -141,7 +140,7 @@ describe('Test video abuses', function () {
141 abuseServer2 = res2.body.data[0] 140 abuseServer2 = res2.body.data[0]
142 expect(abuseServer2.reason).to.equal('my super bad reason 2') 141 expect(abuseServer2.reason).to.equal('my super bad reason 2')
143 expect(abuseServer2.reporterAccount.name).to.equal('root') 142 expect(abuseServer2.reporterAccount.name).to.equal('root')
144 expect(abuseServer2.reporterAccount.host).to.equal('localhost:9001') 143 expect(abuseServer2.reporterAccount.host).to.equal('localhost:' + servers[0].port)
145 expect(abuseServer2.state.id).to.equal(VideoAbuseState.PENDING) 144 expect(abuseServer2.state.id).to.equal(VideoAbuseState.PENDING)
146 expect(abuseServer2.state.label).to.equal('Pending') 145 expect(abuseServer2.state.label).to.equal('Pending')
147 expect(abuseServer2.moderationComment).to.be.null 146 expect(abuseServer2.moderationComment).to.be.null