mirror of
https://github.com/wassname/talk.git
synced 2026-07-15 11:26:58 +08:00
Fixing inconsistent test in comment model.
This commit is contained in:
@@ -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);
|
||||
result.sort((a,b) => {
|
||||
if (a.body < b.body) {return -1;}
|
||||
else {return 1;}
|
||||
});
|
||||
expect(result[0]).to.have.property('body')
|
||||
.and.to.equal('comment 10');
|
||||
expect(result[1]).to.have.property('body')
|
||||
|
||||
Reference in New Issue
Block a user