|
|
@ -70,7 +70,7 @@ module.exports.tests.default_error_status = function(test, common) { |
|
|
|
|
|
|
|
|
|
|
|
res.status = function( code ){ |
|
|
|
res.status = function( code ){ |
|
|
|
return { json: function( body ){ |
|
|
|
return { json: function( body ){ |
|
|
|
t.equal( code, 400, '400 Bad Request' ); |
|
|
|
t.equal( code, 500, '400 Bad Request' ); |
|
|
|
t.deepEqual( body, res.body, 'body set' ); |
|
|
|
t.deepEqual( body, res.body, 'body set' ); |
|
|
|
t.end(); |
|
|
|
t.end(); |
|
|
|
}}; |
|
|
|
}}; |
|
|
@ -124,7 +124,7 @@ module.exports.tests.request_timeout = function(test, common) { |
|
|
|
|
|
|
|
|
|
|
|
res.status = function( code ){ |
|
|
|
res.status = function( code ){ |
|
|
|
return { json: function( body ){ |
|
|
|
return { json: function( body ){ |
|
|
|
t.equal( code, 408, 'Request Timeout' ); |
|
|
|
t.equal( code, 500, 'Request Timeout' ); |
|
|
|
t.deepEqual( body, res.body, 'body set' ); |
|
|
|
t.deepEqual( body, res.body, 'body set' ); |
|
|
|
t.end(); |
|
|
|
t.end(); |
|
|
|
}}; |
|
|
|
}}; |
|
|
@ -214,7 +214,7 @@ module.exports.tests.unknown_exception = function(test, common) { |
|
|
|
|
|
|
|
|
|
|
|
res.status = function( code ){ |
|
|
|
res.status = function( code ){ |
|
|
|
return { json: function( body ){ |
|
|
|
return { json: function( body ){ |
|
|
|
t.equal( code, 400, '400 Bad Request' ); |
|
|
|
t.equal( code, 500, '400 Bad Request' ); |
|
|
|
t.deepEqual( body, res.body, 'body set' ); |
|
|
|
t.deepEqual( body, res.body, 'body set' ); |
|
|
|
t.end(); |
|
|
|
t.end(); |
|
|
|
}}; |
|
|
|
}}; |
|
|
|