fixed tests

This commit is contained in:
Daniel
2021-01-29 19:21:41 +01:00
parent fd97e3bda9
commit 2782cf0d6d

View File

@@ -82,12 +82,12 @@ describe("$filter", () => {
it("should support indexof", () => { it("should support indexof", () => {
expect (OData(`Foo?$filter= indexof(name,'x') eq 11`)) expect (OData(`Foo?$filter= indexof(name,'x') eq 11`))
.to.eql (CQL(`SELECT from Foo where locate(name,'x') = 12`)) .to.eql (CQL(`SELECT from Foo where locate(name,'x') = 11`))
}); });
it("should support substring", () => { it("should support substring", () => {
expect (OData(`Foo?$filter= substring(name,1) eq 'foo'`)) expect (OData(`Foo?$filter= substring(name,1) eq 'foo'`))
.to.eql (CQL(`SELECT from Foo where substring(name,2) = 'foo'`)) .to.eql (CQL(`SELECT from Foo where substring(name,1) = 'foo'`))
}); });
it.each(['tolower','toupper','trim'])("should support '%s'", (fn) => { it.each(['tolower','toupper','trim'])("should support '%s'", (fn) => {