From 53453644a34df5dbe0f7ab5751737a25157bd765 Mon Sep 17 00:00:00 2001 From: gaba Date: Fri, 4 Nov 2016 10:19:42 -0700 Subject: [PATCH] Adds tests with array sorted. --- tests/models/comment.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/models/comment.js b/tests/models/comment.js index 160051971..4198f626a 100644 --- a/tests/models/comment.js +++ b/tests/models/comment.js @@ -35,6 +35,10 @@ describe('Comment: models', () => { it('should find an array of comments by asset id', () => { return Comment.findByAssetId('123').then((result) => { expect(result).to.have.length(2); + expect(result.sort()[0]).to.have.property('body') + .and.to.equal('comment 10'); + expect(result.sort()[1]).to.have.property('body') + .and.to.equal('comment 20'); }); }); });