2017-03-03 11:45:40 -06:00
|
|
|
/* eslint-disable no-unused-expressions */
|
|
|
|
|
2016-12-30 05:23:53 -06:00
|
|
|
'use strict'
|
|
|
|
|
|
|
|
const series = require('async/series')
|
|
|
|
|
|
|
|
const loginUtils = require('../../utils/login')
|
|
|
|
const serversUtils = require('../../utils/servers')
|
|
|
|
|
|
|
|
describe('Test remote videos API validators', function () {
|
|
|
|
let server = null
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------
|
|
|
|
|
|
|
|
before(function (done) {
|
|
|
|
this.timeout(20000)
|
|
|
|
|
|
|
|
series([
|
|
|
|
function (next) {
|
|
|
|
serversUtils.flushTests(next)
|
|
|
|
},
|
|
|
|
function (next) {
|
|
|
|
serversUtils.runServer(1, function (server1) {
|
|
|
|
server = server1
|
|
|
|
|
|
|
|
next()
|
|
|
|
})
|
|
|
|
},
|
|
|
|
function (next) {
|
|
|
|
loginUtils.loginAndGetAccessToken(server, function (err, token) {
|
|
|
|
if (err) throw err
|
|
|
|
server.accessToken = token
|
|
|
|
|
|
|
|
next()
|
|
|
|
})
|
|
|
|
}
|
|
|
|
], done)
|
|
|
|
})
|
|
|
|
|
|
|
|
describe('When making a secure request', function () {
|
|
|
|
it('Should check a secure request')
|
|
|
|
})
|
|
|
|
|
|
|
|
describe('When adding a video', function () {
|
|
|
|
it('Should check when adding a video')
|
2017-01-27 05:05:19 -06:00
|
|
|
|
|
|
|
it('Should not add an existing remoteId and host pair')
|
2016-12-30 05:23:53 -06:00
|
|
|
})
|
|
|
|
|
|
|
|
describe('When removing a video', function () {
|
|
|
|
it('Should check when removing a video')
|
|
|
|
})
|
|
|
|
|
2017-01-04 13:59:23 -06:00
|
|
|
describe('When reporting abuse on a video', function () {
|
|
|
|
it('Should check when reporting a video abuse')
|
|
|
|
})
|
|
|
|
|
2016-12-30 05:23:53 -06:00
|
|
|
after(function (done) {
|
|
|
|
process.kill(-server.app.pid)
|
|
|
|
|
|
|
|
// Keep the logs if the test failed
|
|
|
|
if (this.ok) {
|
|
|
|
serversUtils.flushTests(done)
|
|
|
|
} else {
|
|
|
|
done()
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|