Fix all ported tests related to req2params

This commit is contained in:
Raul Ochoa
2015-09-16 18:09:39 +02:00
parent 99d78ce9b8
commit e32ced107e
27 changed files with 271 additions and 40 deletions
+12 -1
View File
@@ -5,11 +5,12 @@ var redis = require('redis');
var step = require('step');
var cartodbServer = require('../../../lib/cartodb/server');
var PortedServerOptions = require('./support/ported_server_options');
var BaseController = require('../../../lib/cartodb/controllers/base');
describe('attributes', function() {
var server = cartodbServer(PortedServerOptions);
server.req2params = PortedServerOptions.req2params;
server.setMaxListeners(0);
var redis_client = redis.createClient(PortedServerOptions.redis.port);
@@ -38,6 +39,16 @@ describe('attributes', function() {
assert.equal(res.headers['access-control-allow-origin'], '*');
}
var req2paramsFn;
before(function() {
req2paramsFn = BaseController.prototype.req2params;
BaseController.prototype.req2params = PortedServerOptions.req2params;
});
after(function() {
BaseController.prototype.req2params = req2paramsFn;
});
it("can only be fetched from layer having an attributes spec", function(done) {
var expected_token;