Fix test as now it's reporting the issue with the query syntax differently

This commit is contained in:
Raul Ochoa 2015-02-26 16:28:25 +01:00
parent a9dac76e38
commit 9ab49d4614
2 changed files with 4 additions and 4 deletions

View File

@ -194,7 +194,7 @@ test('stream response handle errors', function(done) {
console.log(res);
assert.equal(res.statusCode, 400, res.body);
var geoJson = JSON.parse(res.body);
var expectedError = {"error":["syntax error at or near \"1\""]}
var expectedError = {"error":["syntax error at or near \"SELECTT\""]};
assert.deepEqual(geoJson, expectedError);
done();
});

View File

@ -16,9 +16,9 @@ BEGIN
FOR rec IN SELECT CDB_QueryStatements(query) q LOOP
IF NOT ( rec.q ilike 'select %' or rec.q ilike 'with %' ) THEN
--RAISE WARNING 'Skipping %', rec.q;
CONTINUE;
IF NOT ( rec.q ilike 'select%' or rec.q ilike 'with%' ) THEN
--RAISE WARNING 'Skipping %', rec.q;
CONTINUE;
END IF;
BEGIN