mock-request-response
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -5,3 +5,3 @@ { | ||
"description": "Mock request and response objects for node.js", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
(function () { | ||
function Response (setup) { | ||
setup = setup || { }; | ||
setup.headers = setup.headers || { }; | ||
this._internals = setup; | ||
@@ -5,0 +7,0 @@ this.socket = { |
@@ -19,4 +19,13 @@ var vows = require('vows'), | ||
} | ||
}, | ||
'and a header is set': { | ||
topic: function (topic) { | ||
topic.setHeader('foo', 'bar'); | ||
return topic; | ||
}, | ||
'that the header is set correctly': function (topic) { | ||
assert.equal(topic.getHeader('foo'), 'bar'); | ||
} | ||
} | ||
} | ||
}).export(module); |
4673
104