aboutsummaryrefslogblamecommitdiffhomepage
path: root/server/tests/api/check-params/videos-overviews.ts
blob: 3597c81d35fb52b2890d2b403509f8752e8428ec (plain) (tree)
1
2
3
4


                                                                                              
                                                                                 














                                                                    

                                                                          


                                                                   
                                                   






                                  
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */

import 'mocha'
import { cleanupTests, flushAndRunServer, ServerInfo } from '@shared/extra-utils'

describe('Test videos overview', function () {
  let server: ServerInfo

  // ---------------------------------------------------------------

  before(async function () {
    this.timeout(30000)

    server = await flushAndRunServer(1)
  })

  describe('When getting videos overview', function () {

    it('Should fail with a bad pagination', async function () {
      await server.overviews.getVideos({ page: 0, expectedStatus: 400 })
      await server.overviews.getVideos({ page: 100, expectedStatus: 400 })
    })

    it('Should succeed with a good pagination', async function () {
      await server.overviews.getVideos({ page: 1 })
    })
  })

  after(async function () {
    await cleanupTests([ server ])
  })
})