blob: 30ba3b697d939da099f5b18c3979b12593da76e5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
'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')
})
describe('When removing a video', function () {
it('Should check when removing a video')
})
after(function (done) {
process.kill(-server.app.pid)
// Keep the logs if the test failed
if (this.ok) {
serversUtils.flushTests(done)
} else {
done()
}
})
})
|