Remove infowindow endpoint
This commit is contained in:
@@ -490,89 +490,6 @@ suite('multilayer:postgres=' + cdbQueryTablesFromPostgresEnabledValue, function(
|
||||
});
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// GET INFOWINDOW
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
test("get'ing blank infowindow returns blank", function(done){
|
||||
assert.response(server, {
|
||||
headers: {host: 'localhost'},
|
||||
url: '/tiles/my_tablez/infowindow',
|
||||
method: 'GET'
|
||||
},{
|
||||
status: 200,
|
||||
headers: { 'X-Cache-Channel': test_database+':my_tablez' },
|
||||
body: '{"infowindow":null}'
|
||||
}, function() { done(); });
|
||||
});
|
||||
|
||||
test("get'ing blank infowindow with callback returns blank with callback", function(done){
|
||||
assert.response(server, {
|
||||
headers: {host: 'localhost'},
|
||||
url: '/tiles/my_tablez/infowindow?callback=simon',
|
||||
method: 'GET'
|
||||
},{
|
||||
status: 200,
|
||||
body: 'simon({"infowindow":null});'
|
||||
}, function() { done(); });
|
||||
});
|
||||
|
||||
|
||||
test("get'ing completed infowindow with callback returns information with callback", function(done){
|
||||
assert.response(server, {
|
||||
headers: {host: 'localhost'},
|
||||
url: '/tiles/my_table/infowindow?callback=simon',
|
||||
method: 'GET'
|
||||
},{
|
||||
status: 200,
|
||||
body: 'simon({"infowindow":"this, that, the other"});'
|
||||
}, function() { done(); });
|
||||
});
|
||||
|
||||
test("get'ing infowindow of private table should fail when unauthenticated",
|
||||
function(done) {
|
||||
assert.response(server, {
|
||||
headers: {host: 'localhost'},
|
||||
url: '/tiles/test_table_private_1/infowindow',
|
||||
method: 'GET'
|
||||
},{}, function(res) {
|
||||
// FIXME: should be 403 Forbidden
|
||||
assert.equal(res.statusCode, 500, res.statusCode + ': ' + res.body);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
// See http://github.com/Vizzuality/Windshaft-cartodb/issues/55
|
||||
test("get'ing infowindow of private table should fail on unknown username",
|
||||
function(done) {
|
||||
assert.response(server, {
|
||||
headers: {host: 'unknown_user'},
|
||||
url: '/tiles/test_table_private_1/infowindow',
|
||||
method: 'GET'
|
||||
},{
|
||||
}, function(res) {
|
||||
// FIXME: should be 403 Forbidden
|
||||
assert.equal(res.statusCode, 500, res.statusCode + ': ' + res.body);
|
||||
assert.deepEqual(JSON.parse(res.body),
|
||||
{error:"missing unknown_user's database_name in redis (try CARTODB/script/restore_redis)"});
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test("get'ing infowindow of private table should succeed when authenticated",
|
||||
function(done) {
|
||||
assert.response(server, {
|
||||
headers: {host: 'localhost'},
|
||||
url: '/tiles/test_table_private_1/infowindow?map_key=1234',
|
||||
method: 'GET'
|
||||
},{}, function(res) {
|
||||
assert.equal(res.statusCode, 200, res.body);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// GET GRID
|
||||
|
||||
Reference in New Issue
Block a user