Fix tag tests
This commit is contained in:
parent
e54163c2d5
commit
f6e692f5ee
|
@ -187,18 +187,6 @@ describe('Test videos API validator', function () {
|
||||||
requestsUtils.makePostUploadRequest(server.url, path, server.accessToken, data, attach, done)
|
requestsUtils.makePostUploadRequest(server.url, path, server.accessToken, data, attach, done)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should fail without tags', function (done) {
|
|
||||||
const data = {
|
|
||||||
name: 'my super name',
|
|
||||||
category: 5,
|
|
||||||
description: 'my super description'
|
|
||||||
}
|
|
||||||
const attach = {
|
|
||||||
'videofile': pathUtils.join(__dirname, '..', 'fixtures', 'video_short.webm')
|
|
||||||
}
|
|
||||||
requestsUtils.makePostUploadRequest(server.url, path, server.accessToken, data, attach, done)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should fail with too many tags', function (done) {
|
it('Should fail with too many tags', function (done) {
|
||||||
const data = {
|
const data = {
|
||||||
name: 'my super name',
|
name: 'my super name',
|
||||||
|
@ -212,19 +200,6 @@ describe('Test videos API validator', function () {
|
||||||
requestsUtils.makePostUploadRequest(server.url, path, server.accessToken, data, attach, done)
|
requestsUtils.makePostUploadRequest(server.url, path, server.accessToken, data, attach, done)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should fail with not enough tags', function (done) {
|
|
||||||
const data = {
|
|
||||||
name: 'my super name',
|
|
||||||
category: 5,
|
|
||||||
description: 'my super description',
|
|
||||||
tags: [ ]
|
|
||||||
}
|
|
||||||
const attach = {
|
|
||||||
'videofile': pathUtils.join(__dirname, '..', 'fixtures', 'video_short.webm')
|
|
||||||
}
|
|
||||||
requestsUtils.makePostUploadRequest(server.url, path, server.accessToken, data, attach, done)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should fail with a tag length too low', function (done) {
|
it('Should fail with a tag length too low', function (done) {
|
||||||
const data = {
|
const data = {
|
||||||
name: 'my super name',
|
name: 'my super name',
|
||||||
|
@ -386,16 +361,6 @@ describe('Test videos API validator', function () {
|
||||||
requestsUtils.makePutBodyRequest(server.url, path + videoId, server.accessToken, data, done)
|
requestsUtils.makePutBodyRequest(server.url, path + videoId, server.accessToken, data, done)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should fail with not enough tags', function (done) {
|
|
||||||
const data = {
|
|
||||||
name: 'my super name',
|
|
||||||
category: 5,
|
|
||||||
description: 'my super description',
|
|
||||||
tags: [ ]
|
|
||||||
}
|
|
||||||
requestsUtils.makePutBodyRequest(server.url, path + videoId, server.accessToken, data, done)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should fail with a tag length too low', function (done) {
|
it('Should fail with a tag length too low', function (done) {
|
||||||
const data = {
|
const data = {
|
||||||
name: 'my super name',
|
name: 'my super name',
|
||||||
|
@ -416,16 +381,6 @@ describe('Test videos API validator', function () {
|
||||||
requestsUtils.makePutBodyRequest(server.url, path + videoId, server.accessToken, data, done)
|
requestsUtils.makePutBodyRequest(server.url, path + videoId, server.accessToken, data, done)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should fail with malformed tags', function (done) {
|
|
||||||
const data = {
|
|
||||||
name: 'my super name',
|
|
||||||
category: 5,
|
|
||||||
description: 'my super description',
|
|
||||||
tags: [ 'my tag' ]
|
|
||||||
}
|
|
||||||
requestsUtils.makePutBodyRequest(server.url, path + videoId, server.accessToken, data, done)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should fail with a video of another user')
|
it('Should fail with a video of another user')
|
||||||
|
|
||||||
it('Should fail with a video of another pod')
|
it('Should fail with a video of another pod')
|
||||||
|
|
Loading…
Reference in New Issue