+ it('Should fail with a bad start pagination', async function () {
+ await checkBadStartPagination(server.url, path, server.accessToken)
+ })
+
+ it('Should fail with a bad count pagination', async function () {
+ await checkBadCountPagination(server.url, path, server.accessToken)
+ })
+
+ it('Should fail with an incorrect sort', async function () {
+ await checkBadSortPagination(server.url, path, server.accessToken)
+ })
+
+ it('Should success with the correct parameters', async function () {
+ await makeGetRequest({ url: server.url, path, statusCodeExpected: 200 })
+ })
+ })
+
+ describe('When listing video channel videos', function () {
+ let path: string
+
+ before(async function () {
+ path = '/api/v1/video-channels/' + channelUUID + '/videos'
+ })
+
+ it('Should fail with a bad start pagination', async function () {
+ await checkBadStartPagination(server.url, path, server.accessToken)
+ })
+
+ it('Should fail with a bad count pagination', async function () {
+ await checkBadCountPagination(server.url, path, server.accessToken)
+ })
+
+ it('Should fail with an incorrect sort', async function () {
+ await checkBadSortPagination(server.url, path, server.accessToken)
+ })
+
+ it('Should success with the correct parameters', async function () {
+ await makeGetRequest({ url: server.url, path, statusCodeExpected: 200 })
+ })
+ })
+
+ describe('When adding a video', function () {
+ let baseCorrectParams
+ const baseCorrectAttaches = {
+ 'videofile': join(__dirname, '..', '..', 'fixtures', 'video_short.webm')
+ }
+
+ before(function () {
+ // Put in before to have channelId
+ baseCorrectParams = {