Quellcode durchsuchen

Add test to see if previousURL conforms to expectation

sbkwgh vor 8 Jahren
Ursprung
Commit
bd221f88d2
1 geänderte Dateien mit 4 neuen und 0 gelöschten Zeilen
  1. 4 0
      test/thread_post.js

+ 4 - 0
test/thread_post.js

@@ -389,6 +389,10 @@ describe('Thread and post', () => {
 
 			pageTwo.body.Posts.should.have.length(10)
 			pageTwo.body.Posts[0].should.have.property('content', '<p>POST 10</p>\n')
+			pageTwo.body.meta.should.have.property(
+				'previousURL',
+				`/api/v1/thread/${thread.body.id}?limit=10&lastId=${pageOne.body.Posts[0].id}`
+			)
 
 			pageThree.body.Posts.should.have.length(10)
 			pageThree.body.Posts[0].should.have.property('content', '<p>POST 20</p>\n')