Skip to content

Commit

Permalink
Sort HTTP methods in response, but fix issue with leaking global var
Browse files Browse the repository at this point in the history
  • Loading branch information
sgress454 committed Apr 9, 2015
1 parent 35f2efd commit ddf204a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/integration/hook.cors_csrf.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ describe('CORS and CSRF ::', function() {
url: 'test',
}, function(err, response) {
if (err) return done(new Error(err));
body = response.body.split(',').sort().join(',');
var body = response.body.split(',').sort().join(',');
assert.equal(response.statusCode, 200);
assert.equal(response.body, 'CHECKOUT,CONNECT,COPY,DELETE,GET,HEAD,LOCK,M-SEARCH,MERGE,MKACTIVITY,MKCOL,MOVE,NOTIFY,PATCH,POST,PROPFIND,PROPPATCH,PURGE,PUT,REPORT,SEARCH,SUBSCRIBE,TRACE,UNLOCK,UNSUBSCRIBE', require('util').format('Unexpected HTTP methods: "%s"', response.body));
assert.equal(body, 'CHECKOUT,CONNECT,COPY,DELETE,GET,HEAD,LOCK,M-SEARCH,MERGE,MKACTIVITY,MKCOL,MOVE,NOTIFY,PATCH,POST,PROPFIND,PROPPATCH,PURGE,PUT,REPORT,SEARCH,SUBSCRIBE,TRACE,UNLOCK,UNSUBSCRIBE', require('util').format('Unexpected HTTP methods: "%s"', response.body));
done();
});

Expand Down

0 comments on commit ddf204a

Please sign in to comment.