|
|
@ -54,6 +54,21 @@ describe('Filter', function () {
|
|
|
|
assert.equal(filter.validate(data), true)
|
|
|
|
assert.equal(filter.validate(data), true)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it('_in single, missing tags', function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const filter = new Filter({
|
|
|
|
|
|
|
|
tags: {
|
|
|
|
|
|
|
|
_in: 'monday'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const data = {
|
|
|
|
|
|
|
|
name: 'monday'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assert.equal(filter.validate(data), false)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
it('_in array', function() {
|
|
|
|
it('_in array', function() {
|
|
|
|
|
|
|
|
|
|
|
|
const filter = new Filter({
|
|
|
|
const filter = new Filter({
|
|
|
|