Skip to content
Myr

Added test for res.clearCookie()

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 6a68950 · Browse files · 1 file+18 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+18 added−0 removed

  • tests:+18 added−0 removed

1 file+18 added−0 removed

modified:test/response.test.js+18 added
253 unmodified lines
254 assert.equal(255 'rememberme=yes; expires=Thu, 01 Jan 1970 00:00:00 GMT; httpOnly',256 res.headers['set-cookie'][0]);257 });258 },259 260 'test #clearCookie()': function(assert){261 var app = express.createServer();262 263 app.get('/', function(req, res){264 res.clearCookie('rememberme');265 res.redirect('/');266 });267 268 assert.response(app,269 { url: '/' },270 function(res){271 //assert.length(res.headers['set-cookie'], 1);272 assert.equal(273 'rememberme=; expires=Thu, 01 Jan 1970 00:00:00 GMT',274 res.headers['set-cookie'][0]);275 });276 }277};