Преглед на файлове

Fix wrong request agent

sbkwgh преди 8 години
родител
ревизия
c883be1f6b
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      test/thread_post.js

+ 3 - 3
test/thread_post.js

@@ -218,7 +218,7 @@ describe('Thread and post', () => {
 
 			let thread = await userAgent.get('/api/v1/thread/1')
 
-			thread.body.should.have.status('locked', true)
+			thread.body.should.have.property('locked', true)
 		
 		})
 		it('should unlock the thread', async () => {
@@ -235,10 +235,10 @@ describe('Thread and post', () => {
 
 			let thread = await userAgent.get('/api/v1/thread/1')
 
-			thread.body.should.have.status('locked', false)
+			thread.body.should.have.property('locked', false)
 		})
 		it('should return an error if thread does not exist', done => {
-			chai.request(server)
+			userAgent
 				.put('/api/v1/thread/not_a_thread')
 				.set('content-type', 'application/json')
 				.send({