Task filter now searches checklists

This commit is contained in:
TheHollidayInn
2015-06-25 22:30:47 -05:00
parent 07541ea7e4
commit 8ba621795a
2 changed files with 16 additions and 0 deletions
+9
View File
@@ -51,5 +51,14 @@ describe('Task Ordering Filters', function() {
expect(filter('filterByTextAndNotes')(tasks, 'bar')).to.eql([tasks[1]]);
expect(filter('filterByTextAndNotes')(tasks, 'foo')).to.eql([tasks[0], tasks[1]]);
});
it('filters items by checklists', function () {
var tasks = [
{ text: 'foo' },
{ text: 'foo', notes: 'bar', checklist: [ {text: "checkListToFind"} ] }
];
expect(filter('filterByTextAndNotes')(tasks, 'checkListToFind')).to.eql([tasks[1]]);
});
});
});