Removing randomness from comments api tests.

This commit is contained in:
David Jay
2016-11-08 15:22:38 -05:00
parent eb00e63a41
commit d3b8184ff4
+3 -2
View File
@@ -147,10 +147,11 @@ describe('Get /:comment_id', () => {
.get('/api/v1/comments')
.query({'comment_id': 'abc'})
.end(function(err, res){
const sorted = res.body.sort((a, b) => a.body - b.body);
expect(err).to.be.null;
expect(res).to.have.status(200);
expect(res.body[0]).to.have.property('body');
expect(res.body[0].body).to.equal('comment 10');
expect(sorted[0]).to.have.property('body')
.and.to.equal('comment 10');
done();
});
});