diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-27 20:03:37 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-27 20:03:37 +0100 |
commit | d50acfab69ce9e05b272dea6c4d34d52960ba14c (patch) | |
tree | 55ce8b70777603b772d2cecb96cd71aac9ccfb9c /server/tests/api/check-params/video-comments.ts | |
parent | ae45f988bb5ea32152cca02a282d02599dbb633b (diff) | |
download | PeerTube-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.ts | 16 |
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 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as request from 'supertest' | 4 | import * as request from 'supertest' |
5 | import { | 5 | import { flushTests, killallServers, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../utils' |
6 | createUser, flushTests, getUserAccessToken, killallServers, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers, | ||
7 | uploadVideo | ||
8 | } from '../../utils' | ||
9 | import { addVideoCommentThread } from '../../utils/video-comments' | 6 | import { addVideoCommentThread } from '../../utils/video-comments' |
10 | 7 | ||
11 | describe('Test video comments API validator', function () { | 8 | describe('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' |