tests: use supertest expect to test body

This commit is contained in:
Douglas Christopher Wilson 2018-01-17 00:20:15 -05:00
parent c6f12a8971
commit f8fba68ec0

View File

@ -52,10 +52,7 @@ describe('error-pages', function(){
request(app)
.get('/404')
.set('Accept','application/json')
.end(function(err, res){
res.body.should.eql({ error: 'Not found' });
done()
})
.expect(404, { error: 'Not found' }, done)
})
})