|
@@ -133,4 +133,11 @@ describe('test/app/extend/helper.test.js', () => {
|
|
|
assert(ctx.helper.mul(0.07, 10) === 0.7);
|
|
|
assert(ctx.helper.div(0.32, 0.2) === 1.6);
|
|
|
});
|
|
|
+
|
|
|
+ it('test getInArrStrSqlFilter', function () {
|
|
|
+ const ctx = app.mockContext();
|
|
|
+ const id = ['abc', 'efj'];
|
|
|
+ const str = 'And id in (' + ctx.helper.getInArrStrSqlFilter(id) + ')';
|
|
|
+ assert(str === "And id in ('abc','efj')");
|
|
|
+ })
|
|
|
});
|