Skip to content

Commit

Permalink
Test case for Response.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredhanson committed Dec 7, 2013
1 parent d22a037 commit 6754fbf
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/response.test.js
@@ -0,0 +1,25 @@
/* global describe, it, before, expect */

var Response = require('../lib/response');

describe('Response', function() {

describe('constructor', function() {
var res = new Response();

it('should be constructed with default properties', function() {
expect(Object.keys(res)).to.have.length(2);
expect(res.statusCode).to.equal(200);
});
});

describe('#setHeader', function() {
var res = new Response();
res.setHeader('Content-Type', 'application/json');

it('should get set header', function() {
expect(res.getHeader('Content-Type')).to.equal('application/json');
});
});

});

0 comments on commit 6754fbf

Please sign in to comment.