Use global for req2params number of request assert
This commit is contained in:
parent
352dc6b311
commit
066aff16f1
@ -1283,7 +1283,7 @@ describe('multilayer', function() {
|
||||
step(
|
||||
function do_post()
|
||||
{
|
||||
server.req2params_calls = 0;
|
||||
global.req2params_calls = 0;
|
||||
var next = this;
|
||||
assert.response(server, {
|
||||
url: '/database/windshaft_test/layergroup',
|
||||
@ -1297,7 +1297,7 @@ describe('multilayer', function() {
|
||||
assert.equal(res.statusCode, 200, res.statusCode + ': ' + res.body);
|
||||
var parsedBody = JSON.parse(res.body);
|
||||
expected_token = LayergroupToken.parse(parsedBody.layergroupid).token;
|
||||
assert.equal(server.req2params_calls, 1);
|
||||
assert.equal(global.req2params_calls, 1);
|
||||
return null;
|
||||
},
|
||||
function finish(err) {
|
||||
|
@ -70,8 +70,7 @@ module.exports = _.extend({}, serverOptions, {
|
||||
|
||||
|
||||
// increment number of calls counter
|
||||
// NOTE: "this" would likely point to the server instance
|
||||
this.req2params_calls = this.req2params_calls ? this.req2params_calls + 1 : 1;
|
||||
global.req2params_calls = global.req2params_calls ? global.req2params_calls + 1 : 1;
|
||||
|
||||
// send the finished req object on
|
||||
callback(null,req);
|
||||
|
Loading…
Reference in New Issue
Block a user