Skip to content
Myr

Fixed specs for halt()

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent 689afd3 · Browse files · 1 file+10 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−6 removed

  • tests:+10 added−6 removed

1 file+10 added−6 removed

modified:spec/spec.core.js+10 added-6 removed
120 unmodified lines
121 Express.response.status = 200122 end123 124 it 'should set response status and body'125 -{ Express.halt('Page or file cannot be found', 'Not Found') }.should.throw_error126 Express.response.status.should.eql 404127 Express.response.body.should.eql 'Page or file cannot be found'125 get('/foo', function(){126 halt('Page or file cannot be found', 'Not Found')127 })128 get('/foo').status.should.eql 404129 get('/foo').body.should.eql 'Page or file cannot be found'130 end131 132 it 'should allow specific status to be passed'131 -{ Express.halt('File cannot be found', 404) }.should.throw_error132 Express.response.status.should.eql 404133 Express.response.body.should.eql 'File cannot be found'133 get('/foo', function(){134 halt('Page or file cannot be found', 'Not Found')135 })136 get('/foo').status.should.eql 404137 get('/foo').body.should.eql 'Page or file cannot be found'138 end139 end140141 describe '.redirect()'
89 unmodified lines