Skip to content

Commit

Permalink
Resolves mismatch here (balderdashy#2291 (comment))
Browse files Browse the repository at this point in the history
  • Loading branch information
mikermcneil committed Oct 12, 2014
1 parent d40a60b commit ff7b850
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/integration/hook.cors_csrf.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,17 @@ describe('CORS and CSRF ::', function() {
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.body, "GET,POST,PUT,HEAD,DELETE,TRACE,COPY,LOCK,MKCOL,MOVE,PURGE,PROPFIND,PROPPATCH,UNLOCK,REPORT,MKACTIVITY,CHECKOUT,MERGE,M-SEARCH,NOTIFY,SUBSCRIBE,UNSUBSCRIBE,PATCH,SEARCH,CONNECT");
//
// NOTE:
// The bump to Express 3.16.0 caused a change here.
// see https://github.com/balderdashy/sails/pull/2291#issuecomment-58809939
//
// Original test:
// assert.equal(response.body, "GET,POST,PUT,HEAD,DELETE,TRACE,COPY,LOCK,MKCOL,MOVE,PURGE,PROPFIND,PROPPATCH,UNLOCK,REPORT,MKACTIVITY,CHECKOUT,MERGE,M-SEARCH,NOTIFY,SUBSCRIBE,UNSUBSCRIBE,PATCH,SEARCH,CONNECT");

// Changed to match what comes back post-upgrade:
// (removed "PURGE", "SEARCH", and "CONNECT")
assert.equal(response.body, "GET,POST,PUT,HEAD,DELETE,TRACE,COPY,LOCK,MKCOL,MOVE,PROPFIND,PROPPATCH,UNLOCK,REPORT,MKACTIVITY,CHECKOUT,MERGE,M-SEARCH,NOTIFY,SUBSCRIBE,UNSUBSCRIBE,PATCH", require('util').format('Unexpected HTTP methods: "%s"', response.body));
done();
});

Expand Down

0 comments on commit ff7b850

Please sign in to comment.