Fix use of blank-prefixed "zoom" variable in CartoCSS

This commit is contained in:
Sandro Santilli
2013-09-09 11:58:51 +02:00
parent ff9af5f923
commit 56bfed5a0e
4 changed files with 27 additions and 7 deletions
+17
View File
@@ -1020,6 +1020,23 @@ suite('server', function() {
);
});
// Zoom is a special variable
test("Specifying zoom level in CartoCSS does not need a 'zoom' variable in SQL output", function(done){
// NOTE: may fail if grainstore < 0.3.0 is used by Windshaft
var query = querystring.stringify({
sql: "SELECT 'SRID=3857;POINT(0 0)'::geometry as the_geom_webmercator, 1::int as cartodb_id",
style: '#gadm4 [ zoom>=3] { marker-fill:red; }'
});
assert.response(server, {
headers: {host: 'localhost'},
url: '/tiles/gadm4/0/0/0.png?' + query,
method: 'GET'
},{}, function(res) {
assert.equal(res.statusCode, 200, res.statusCode + ': ' + res.body);
done();
});
});
/////////////////////////////////////////////////////////////////////////////////
//
// DELETE CACHE