mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Add ability to skip count query
This commit is contained in:
@@ -40,7 +40,6 @@ describe('Test videos filters', function () {
|
||||
let server: ServerInfo
|
||||
let userAccessToken: string
|
||||
let moderatorAccessToken: string
|
||||
let playlistUUID: string
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -75,8 +75,12 @@ describe('Test videos API validator', function () {
|
||||
await checkBadSortPagination(server.url, path)
|
||||
})
|
||||
|
||||
it('Should fail with a bad skipVideos query', async function () {
|
||||
await makeGetRequest({ url: server.url, path, statusCodeExpected: 200, query: { skipCount: 'toto' } })
|
||||
})
|
||||
|
||||
it('Should success with the correct parameters', async function () {
|
||||
await makeGetRequest({ url: server.url, path, statusCodeExpected: 200 })
|
||||
await makeGetRequest({ url: server.url, path, statusCodeExpected: 200, query: { skipCount: false } })
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -322,6 +322,15 @@ describe('Test a single server', function () {
|
||||
expect(videos[0].name).to.equal(videosListBase[5].name)
|
||||
})
|
||||
|
||||
it('Should not have the total field', async function () {
|
||||
const res = await getVideosListPagination(server.url, 5, 6, 'name', true)
|
||||
|
||||
const videos = res.body.data
|
||||
expect(res.body.total).to.not.exist
|
||||
expect(videos.length).to.equal(1)
|
||||
expect(videos[0].name).to.equal(videosListBase[5].name)
|
||||
})
|
||||
|
||||
it('Should list and sort by name in descending order', async function () {
|
||||
const res = await getVideosListSort(server.url, '-name')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user