FIX: Ignore case when comparing category name and search term.

This commit is contained in:
Guo Xiang Tan
2016-01-05 15:15:04 +08:00
parent d6b5b9436c
commit 0fa9a50378
2 changed files with 7 additions and 4 deletions

View File

@@ -141,6 +141,9 @@ test('search', () => {
deepEqual(result(''), [category1.get('id'), category2.get('id')], "orders by activity if no term is matched");
deepEqual(result('term'), [category1.get('id'), category2.get('id')], "orders by activity");
category2.set('name', 'TeRm start');
deepEqual(result('tErM'), [category2.get('id'), category1.get('id')], "ignores case of category name and search term");
category2.set('name', 'term start');
deepEqual(result('term'), [category2.get('id'), category1.get('id')], "orders matching begin with and then contains");