2 var app = require('../../examples/error-pages')
3 , request = require('supertest');
5 describe('error-pages', function(){
6 describe('GET /', function(){
7 it('should respond with page list', function(done){
10 .expect(/Pages Example/, done)
14 describe('Accept: text/html',function(){
15 describe('GET /403', function(){
16 it('should respond with 403', function(done){
23 describe('GET /404', function(){
24 it('should respond with 404', function(done){
31 describe('GET /500', function(){
32 it('should respond with 500', function(done){
40 describe('Accept: application/json',function(){
41 describe('GET /403', function(){
42 it('should respond with 403', function(done){
45 .set('Accept','application/json')
50 describe('GET /404', function(){
51 it('should respond with 404', function(done){
54 .set('Accept','application/json')
55 .expect(404, { error: 'Not found' }, done)
59 describe('GET /500', function(){
60 it('should respond with 500', function(done){
63 .set('Accept', 'application/json')
70 describe('Accept: text/plain',function(){
71 describe('GET /403', function(){
72 it('should respond with 403', function(done){
75 .set('Accept','text/plain')
80 describe('GET /404', function(){
81 it('should respond with 404', function(done){
84 .set('Accept', 'text/plain')
86 .expect('Not found', done);
90 describe('GET /500', function(){
91 it('should respond with 500', function(done){
94 .set('Accept','text/plain')