Skip to content
Myr

Added OPTIONS 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 9536f28 · 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
487 unmodified lines
488 489 assert.response(app,490 { url: '/users/0-3' },491 { body: 'users tj, tobi, loki' });492 },493 494 'test OPTIONS': function(){495 var app = express.createServer();496 497 app.get('/', function(){});498 app.get('/user/:id', function(){});499 app.put('/user/:id', function(){});500 501 assert.response(app,502 { url: '/', method: 'OPTIONS' },503 { headers: { Allow: 'GET' }});504 505 assert.response(app,506 { url: '/user/12', method: 'OPTIONS' },507 { headers: { Allow: 'GET,PUT' }});508 }509};