Skip to content
Myr

Fixed sessions when testing

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

authored by visionmedia · committed by visionmedia · parent 9d5a6f9 · Browse files · 3 files+4 added−4 removed
This commit

State

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

Diff stats

3 files+4 added−4 removed

  • tests:+2 added−3 removed
  • other:+2 added−1 removed

3 files+4 added−4 removed

modified:lib/express/plugins/session.js+2 added-1 removed
modified:lib/express/spec/mocks.js-2 removed
97 unmodified lines
98reset = function() {99 Express.routes = []100 Express.plugins = []101 Express.settings = {}102 if (typeof Session !== 'undefined')103 Session.store.clear()102 configure('test')103}104105/**
24 unmodified lines
modified:spec/spec.plugins.session.js+2 added-1 removed
1 unmodified line
2describe 'Express'3 before_each4 reset()5 use(require('express/plugins/cookie').Cookie)6 use(require('express/plugins/session').Session)6 use(Session = require('express/plugins/session').Session)7 Session.store.clear()8 end9 10 describe 'Session'11 describe 'when sid cookie is not present'
83 unmodified lines