1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Add comments federation tests

This commit is contained in:
Chocobozzz 2017-12-27 20:03:37 +01:00
parent ae45f988bb
commit d50acfab69
No known key found for this signature in database
GPG key ID: 583A612D890159BE
10 changed files with 136 additions and 57 deletions

View file

@ -2,17 +2,13 @@
import 'mocha'
import * as request from 'supertest'
import {
createUser, flushTests, getUserAccessToken, killallServers, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers,
uploadVideo
} from '../../utils'
import { flushTests, killallServers, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../utils'
import { addVideoCommentThread } from '../../utils/video-comments'
describe('Test video comments API validator', function () {
let pathThread: string
let pathComment: string
let server: ServerInfo
let accessTokenUser: string
let videoUUID: string
let commentId: number
@ -27,16 +23,6 @@ describe('Test video comments API validator', function () {
await setAccessTokensToServers([ server ])
{
const user = {
username: 'fake',
password: 'fake_password'
}
await createUser(server.url, server.accessToken, user.username, user.password)
accessTokenUser = await getUserAccessToken(server, user)
}
{
const res = await uploadVideo(server.url, server.accessToken, {})
videoUUID = res.body.video.uuid