diff --git a/test/acceptance/server.js b/test/acceptance/server.js index d8bd3448..23ab46f9 100644 --- a/test/acceptance/server.js +++ b/test/acceptance/server.js @@ -226,5 +226,22 @@ suite('server', function() { }, function() { done(); }); }); + test("get'ing a tile with data from private table should fail when unauthenticated (uses old redis key)", function(done){ + var sql = querystring.stringify({ + sql: "SELECT * FROM test_table_private_1", + cache_buster:3, + // 1235 is written in rails:users:vizzuality:map_key SET + // See https://github.com/Vizzuality/Windshaft-cartodb/issues/39 + map_key: 1235 + }); + assert.response(server, { + headers: {host: 'vizzuality.localhost.lan'}, + url: '/tiles/gadm4/6/31/24.png?' + sql, + method: 'GET' + },{ + status: 500, + }, function() { done(); }); + }); + });