parent
6da454c7fb
commit
fde8f647d3
@ -68,7 +68,7 @@ app.get('/users/:from-:to', function(req, res, next){
|
||||
var from = req.params.from;
|
||||
var to = req.params.to;
|
||||
var names = users.map(function(user){ return user.name; });
|
||||
res.send('users ' + names.slice(from, to).join(', '));
|
||||
res.send('users ' + names.slice(from, to + 1).join(', '));
|
||||
});
|
||||
|
||||
/* istanbul ignore next */
|
||||
|
@ -29,8 +29,8 @@ describe('params', function(){
|
||||
describe('GET /users/0-2', function(){
|
||||
it('should respond with three users', function(done){
|
||||
request(app)
|
||||
.get('/users/0-2')
|
||||
.expect(/users tj, tobi/,done)
|
||||
.get('/users/0-2')
|
||||
.expect(/users tj, tobi, loki/, done)
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user