1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-05-18 06:16:39 +02:00

Added date filtering test case with data range and operators

This commit is contained in:
Max Guglielmi 2017-01-21 10:51:38 +11:00
parent 44af1dc552
commit 9a7e8f6982

View file

@ -270,8 +270,24 @@ test('can filter empty value with [nonempty] operator', function(){
);
});
// module('Tear-down');
// test('can destroy TableFilter DOM elements', function() {
// tf.destroy();
// deepEqual(tf.isInitialized(), false, 'Filters removed');
// });
test('can filter date with date range with operators', function(){
// setup
tf.clearFilters();
// act
tf.setFilterValue(2, '<3-jan-2014 && >=23-Oct-2007');
tf.filter();
// assert
deepEqual(
tf.getFilteredDataCol(2),
['23-Oct-2007', '14-Mar-2009'],
'Expected match'
);
});
module('Tear-down');
test('can destroy TableFilter DOM elements', function() {
tf.destroy();
deepEqual(tf.isInitialized(), false, 'Filters removed');
});