Skip to content
Myr

Added app.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 42953c7 · Browse files · 2 files+53 added−22 removed
This commit

State

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

Diff stats

2 files+53 added−22 removed

  • tests:+53 added−22 removed

2 files+53 added−22 removed

added:test/app.options.js+53 added
modified:test/app.router.js-22 removed
18 unmodified lines
19 })20 });21 })2223 describe('OPTIONS', function(){24 it('should default to the routes defined', function(done){25 var app = express();2627 app.get('/users', function(req, res){28 29 });3031 app.put('/users', function(req, res){32 33 });3435 request(app)36 .options('/users')37 .end(function(res){38 res.body.should.equal('GET,PUT');39 res.headers.should.have.property('allow', 'GET,PUT');40 done();41 });42 })43 })4423 it('should be .use()able', function(done){24 var app = express();2526 var calls = [];
409 unmodified lines