Skip to content

Commit

Permalink
Added test for an array of paths
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindfjeldstad committed Feb 12, 2012
1 parent 28d7750 commit 38b046d
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion test/app.router.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

var express = require('../')
, request = require('./support/http')
, assert = require('assert');
Expand Down Expand Up @@ -110,6 +109,24 @@ describe('app.router', function(){
.expect('editing user 10', done);
})
})

describe('when given an array', function(){
it('should match all paths in the array', function(done){
var app = express();

app.get(['/one', '/two'], function(req, res){
res.end('works');
});

request(app)
.get('/one')
.expect('works', function() {
request(app)
.get('/two')
.expect('works', done);
});
})
})

describe('case sensitivity', function(){
it('should be disabled by default', function(done){
Expand Down

0 comments on commit 38b046d

Please sign in to comment.