0b1b49cb8a
closes #508
18 lines
415 B
JavaScript
18 lines
415 B
JavaScript
|
|
'use strict';
|
|
|
|
var request = require('../context').request;
|
|
var assert = require('assert');
|
|
|
|
describe('ctx.length', function(){
|
|
it('should return length in content-length', function(){
|
|
var req = request();
|
|
req.header['content-length'] = '10';
|
|
req.length.should.equal(10);
|
|
})
|
|
|
|
describe('with no content-length present', function(){
|
|
var req = request();
|
|
assert(null == req.length);
|
|
})
|
|
})
|