From 9ab49d46147bbcba2ab56d4d9d483dca4a7728e4 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Thu, 26 Feb 2015 16:28:25 +0100 Subject: [PATCH] Fix test as now it's reporting the issue with the query syntax differently --- test/acceptance/export/geojson.js | 2 +- test/support/CDB_QueryTables.sql | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/acceptance/export/geojson.js b/test/acceptance/export/geojson.js index 003d5ab0..8f4214f0 100644 --- a/test/acceptance/export/geojson.js +++ b/test/acceptance/export/geojson.js @@ -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(); }); diff --git a/test/support/CDB_QueryTables.sql b/test/support/CDB_QueryTables.sql index 2fb9532a..cd8b51b4 100644 --- a/test/support/CDB_QueryTables.sql +++ b/test/support/CDB_QueryTables.sql @@ -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