1 var app = require('../../examples/params')
2 var request = require('supertest')
4 describe('params', function(){
5 describe('GET /', function(){
6 it('should respond with instructions', function(done){
13 describe('GET /user/0', function(){
14 it('should respond with a user', function(done){
17 .expect(/user tj/,done)
21 describe('GET /user/9', function(){
22 it('should fail to find user', function(done){
25 .expect(404, /failed to find user/, done)
29 describe('GET /users/0-2', function(){
30 it('should respond with three users', function(done){
33 .expect(/users tj, tobi, loki/, done)
37 describe('GET /users/foo-bar', function(){
38 it('should fail integer parsing', function(done){
40 .get('/users/foo-bar')
41 .expect(400, /failed to parseInt foo/, done)