).toEqual(`["etag","in",["etagValue1","etagValue2"]]`);
});
+ it("should add 'not in' rule for set", () => {
+ expect(
+ filters.addNotIn("etag", ["etagValue1", "etagValue2"]).getFilters()
+ ).toEqual(`["etag","not in",["etagValue1","etagValue2"]]`);
+ });
+
it("should add multiple rules", () => {
expect(
filters
expect(new FilterBuilder()
.addIn("etag", ["etagValue1", "etagValue2"], "myPrefix")
.getFilters())
- .toEqual(`["my_prefix.etag","in",["etagValue1","etagValue2"]]`);
+ .toEqual(`["myPrefix.etag","in",["etagValue1","etagValue2"]]`);
+ });
+
+ it('should add full text search', () => {
+ expect(
+ new FilterBuilder()
+ .addFullTextSearch('my custom search')
+ .getFilters()
+ ).toEqual(`["any","ilike","%my%"],["any","ilike","%custom%"],["any","ilike","%search%"]`);
});
});