Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Budleigh Salterton committed Oct 13, 2015
1 parent cffbe00 commit df51e16
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/http-server-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ vows.describe('http-server').addBatch({
topic: function () {
var server = httpServer.createServer({
root: root,
cors: true
cors: true,
cors_headers: 'X-Test'
});
server.listen(8082);
this.callback(null, server);
Expand All @@ -148,6 +149,9 @@ vows.describe('http-server').addBatch({
},
'status code should be 204': function (err, res) {
assert.equal(res.statusCode, 204);
},
'response Access-Control-Allow-Headers should contain X-Test': function (err, res, body) {
assert.ok(res.headers['Access-Control-Allow-Headers'].split(/\s*,\s*/g).indexOf('X-Test') >= 0, 204);
}
}
}
Expand Down

0 comments on commit df51e16

Please sign in to comment.