spec.plugins.content-length.js
This file
Path
spec/spec.plugins.content-length.js
28 lines · 731 bytes · JavaScript
Last changed by
Added ContentLength pluginvisionmediabefore adoptiondea4ac9
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(){ header('content-length', 10) return 'body { background: #000; }' }) get('/style.css').headers['content-length'].should.eql 10 end end end endend