|
@@ -402,12 +402,12 @@ describe('Thread and post', () => {
|
|
|
pageOne.body.Posts[0].should.have.property('content', '<p>POST 0</p>\n')
|
|
|
|
|
|
pageTwo.body.Posts.should.have.length(10)
|
|
|
- pageOne.body.meta.should.have.property('postsRemaining', 10)
|
|
|
+ pageTwo.body.meta.should.have.property('postsRemaining', 10)
|
|
|
pageTwo.body.Posts[0].should.have.property('content', '<p>POST 10</p>\n')
|
|
|
pageTwo.body.meta.should.have.property('previousURL')
|
|
|
|
|
|
pageThree.body.Posts.should.have.length(10)
|
|
|
- pageOne.body.meta.should.have.property('postsRemaining', 0)
|
|
|
+ pageThree.body.meta.should.have.property('postsRemaining', 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
|
|
@@ -437,13 +437,13 @@ describe('Thread and post', () => {
|
|
|
pageZero.body.Posts.should.have.length(10)
|
|
|
pageZero.body.Posts[0].should.have.property('content', '<p>POST 1</p>\n')
|
|
|
pageZero.body.Posts[9].should.have.property('content', '<p>POST 10</p>\n')
|
|
|
- pageTwo.body.meta.should.have.property('postsRemaining', 19)
|
|
|
+ pageZero.body.meta.should.have.property('postsRemaining', 19)
|
|
|
|
|
|
|
|
|
let pageFirst = await http.get(pageZero.body.meta.previousURL)
|
|
|
pageFirst.body.Posts[0].should.have.property('content', '<p>POST 0</p>\n')
|
|
|
pageFirst.body.meta.should.have.property('previousURL', null)
|
|
|
- pageFirst.body.meta.should.have.property('postsRemaining', 20)
|
|
|
+ pageFirst.body.meta.should.have.property('postsRemaining', 29)
|
|
|
|
|
|
})
|
|
|
it('should return an error if :id is invalid', async () => {
|