[Pkg-javascript-commits] [node-mocks-http] 73/296: Add test for response.set()

Thorsten Alteholz alteholz at moszumanska.debian.org
Mon Feb 8 18:13:22 UTC 2016


This is an automated email from the git hooks/post-receive script.

alteholz pushed a commit to branch master
in repository node-mocks-http.

commit c44d3992850c6dcf16036ffb8d10026c243948ef
Author: Gregor MacLennan <gmaclennan at digital-democracy.org>
Date:   Wed Feb 25 22:57:33 2015 -0800

    Add test for response.set()
---
 test/test-mockResponse.js | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/test/test-mockResponse.js b/test/test-mockResponse.js
index 5a83b0a..a253a90 100644
--- a/test/test-mockResponse.js
+++ b/test/test-mockResponse.js
@@ -90,6 +90,20 @@ exports['setHeader - Can not call after end'] = function (test) {
   test.done();
 };
 
+exports['set - Can set multiple headers with object'] = function (test) {
+  var response = httpMocks.createResponse();
+
+  response.set({
+    'foo': 'bar',
+    'bling': 'blang'
+  });
+
+  test.equal('bar', response.getHeader('foo'));
+  test.equal('blang', response.getHeader('bling'));
+
+  test.done();
+};
+
 exports['writeHead - Simple verification'] = function (test) {
   var response = httpMocks.createResponse();
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-mocks-http.git



More information about the Pkg-javascript-commits mailing list