mirror of
https://github.com/grafana/grafana.git
synced 2025-09-22 10:12:52 +08:00
fix custom variable quoting in sql* query interpolations
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user