Skip to content
Myr

Added app.configure() immediate call test

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 3c8c7af · Browse files · 1 file+16 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+16 added−0 removed

  • tests:+16 added−0 removed

1 file+16 added−0 removed

modified:test/express.test.js+16 added
180 unmodified lines
181 assert.eql(['any', 'dev'], calls);182 });183 },184 185 'test #configure() immediate call': function(assert){186 var app = express.createServer();187188 app.configure(function(){189 app.use(connect.bodyDecoder());190 });191 192 app.post('/', function(req, res){193 res.send(req.param('name') || 'nope');194 });195196 assert.response(app,197 { url: '/', method: 'POST', data: 'name=tj', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }},198 { body: 'tj' });199 },200 201 'test #set()': function(assert){202 var app = express.createServer();203 var ret = app.set('title', 'My App').set('something', 'else');204 assert.equal(app, ret, 'Test #set() returns server for chaining');
73 unmodified lines