Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d22a037
commit 6754fbf
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'); | ||
}); | ||
}); | ||
|
||
}); |