aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/video-comments.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-27 20:03:37 +0100
committerChocobozzz <me@florianbigard.com>2017-12-27 20:03:37 +0100
commitd50acfab69ce9e05b272dea6c4d34d52960ba14c (patch)
tree55ce8b70777603b772d2cecb96cd71aac9ccfb9c /server/tests/api/check-params/video-comments.ts
parentae45f988bb5ea32152cca02a282d02599dbb633b (diff)
downloadPeerTube-d50acfab69ce9e05b272dea6c4d34d52960ba14c.tar.gz
PeerTube-d50acfab69ce9e05b272dea6c4d34d52960ba14c.tar.zst
PeerTube-d50acfab69ce9e05b272dea6c4d34d52960ba14c.zip
Add comments federation tests
Diffstat (limited to 'server/tests/api/check-params/video-comments.ts')
-rw-r--r--server/tests/api/check-params/video-comments.ts16
1 files changed, 1 insertions, 15 deletions
diff --git a/server/tests/api/check-params/video-comments.ts b/server/tests/api/check-params/video-comments.ts
index 5112274f0..e8d7ddf38 100644
--- a/server/tests/api/check-params/video-comments.ts
+++ b/server/tests/api/check-params/video-comments.ts
@@ -2,17 +2,13 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as request from 'supertest' 4import * as request from 'supertest'
5import { 5import { flushTests, killallServers, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../utils'
6 createUser, flushTests, getUserAccessToken, killallServers, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers,
7 uploadVideo
8} from '../../utils'
9import { addVideoCommentThread } from '../../utils/video-comments' 6import { addVideoCommentThread } from '../../utils/video-comments'
10 7
11describe('Test video comments API validator', function () { 8describe('Test video comments API validator', function () {
12 let pathThread: string 9 let pathThread: string
13 let pathComment: string 10 let pathComment: string
14 let server: ServerInfo 11 let server: ServerInfo
15 let accessTokenUser: string
16 let videoUUID: string 12 let videoUUID: string
17 let commentId: number 13 let commentId: number
18 14
@@ -28,16 +24,6 @@ describe('Test video comments API validator', function () {
28 await setAccessTokensToServers([ server ]) 24 await setAccessTokensToServers([ server ])
29 25
30 { 26 {
31 const user = {
32 username: 'fake',
33 password: 'fake_password'
34 }
35 await createUser(server.url, server.accessToken, user.username, user.password)
36
37 accessTokenUser = await getUserAccessToken(server, user)
38 }
39
40 {
41 const res = await uploadVideo(server.url, server.accessToken, {}) 27 const res = await uploadVideo(server.url, server.accessToken, {})
42 videoUUID = res.body.video.uuid 28 videoUUID = res.body.video.uuid
43 pathThread = '/api/v1/videos/' + videoUUID + '/comment-threads' 29 pathThread = '/api/v1/videos/' + videoUUID + '/comment-threads'