spec.plugins.content-length.js
This file
Path
spec/spec.plugins.content-length.js
28 lines · 736 bytes · JavaScript
Last changed by
Merge branch 'master' of http://github.com/visionmedia/expressGuillermo Rauchbefore adoption8ef6a0b
History of this fileTake it
12345678910111213141516171819202122232425262728
describe 'Express' before_each reset() use(require('express/plugins/content-length').ContentLength) end describe 'ContentLength' describe 'on' describe 'response' it 'should set the content-length header' get('/style.css', function(){ return 'body { background: #000; }' }) get('/style.css').headers['Content-Length'].should.eql 26 end it 'should not override when manually set' get('/style.css', function(){ this.header('Content-Length', 10) return 'body { background: #000; }' }) get('/style.css').headers['Content-Length'].should.eql 10 end end end endend