|
@@ -360,12 +360,15 @@ describe('User', () => {
|
|
|
let pageInvalid = await agent.get('/api/v1/user/paginationaccount?posts=true&from=100')
|
|
|
|
|
|
pageOne.body.Posts.should.have.length(10)
|
|
|
+ pageOne.body.meta.should.have.property('nextPostsCount', 10)
|
|
|
pageOne.body.Posts[0].should.have.property('content', '<p>POST 0</p>\n')
|
|
|
|
|
|
pageTwo.body.Posts.should.have.length(10)
|
|
|
+ pageTwo.body.meta.should.have.property('nextPostsCount', 10)
|
|
|
pageTwo.body.Posts[0].should.have.property('content', '<p>POST 10</p>\n')
|
|
|
|
|
|
pageThree.body.Posts.should.have.length(10)
|
|
|
+ pageThree.body.meta.should.have.property('nextPostsCount', 0)
|
|
|
pageThree.body.Posts[0].should.have.property('content', '<p>POST 20</p>\n')
|
|
|
pageThree.body.Posts[9].should.have.property('content', '<p>POST 29</p>\n')
|
|
|
expect(pageThree.body.meta.nextURL).to.be.null
|
|
@@ -400,9 +403,11 @@ describe('User', () => {
|
|
|
|
|
|
pageOne.body.Threads.should.have.length(10)
|
|
|
pageOne.body.Threads[0].should.have.property('name', 'THREAD 0')
|
|
|
+ pageOne.body.meta.should.have.property('nextThreadsCount', 10)
|
|
|
|
|
|
pageTwo.body.Threads.should.have.length(10)
|
|
|
pageTwo.body.Threads[0].should.have.property('name', 'THREAD 10')
|
|
|
+ pageTwo.body.meta.should.have.property('nextThreadsCount', 0)
|
|
|
expect(pageTwo.body.meta.nextURL).to.be.null
|
|
|
|
|
|
pageInvalid.body.Threads.should.have.length(0)
|