Add another test for authentications using old redis key (#39)

This commit is contained in:
Sandro Santilli
2012-08-02 11:17:53 +02:00
parent 651c45bc16
commit c0eaf826ab
+17
View File
@@ -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(); });
});
});