From c0eaf826abc8e813b14b40c78aeb45f50839d2f2 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 2 Aug 2012 11:17:53 +0200 Subject: [PATCH] Add another test for authentications using old redis key (#39) --- test/acceptance/server.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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(); }); + }); + });