fix custom variable quoting in sql* query interpolations

This commit is contained in:
Brice Maron
2018-08-01 19:38:13 +02:00
parent 9d3743774d
commit bb7e583863
6 changed files with 27 additions and 6 deletions

View File

@ -215,6 +215,13 @@ describe('PostgreSQLDatasource', function() {
});
});
describe('and variable contains single quote', () => {
it('should return a quoted value', () => {
ctx.variable.multi = true;
expect(ctx.ds.interpolateVariable("a'bc", ctx.variable)).toEqual("'a''bc'");
});
});
describe('and variable allows all and is a string', () => {
it('should return a quoted value', () => {
ctx.variable.includeAll = true;