Skip to content

Commit

Permalink
Merge a9e55ee into e2b538c
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Sep 19, 2017
2 parents e2b538c + a9e55ee commit af96972
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/test_intercept.js
Original file line number Diff line number Diff line change
Expand Up @@ -4129,6 +4129,29 @@ test('mocking succeeds even when mocked and specified request header names have

});

test('mocking succeeds when mocked and specified request headers have falsy values (#966)', function(t) {
var scope = nock('http://example.com', {
reqheaders: {
"x-foo": 0
}
})
.post('/resource')
.reply(200, { status: "ok" });

mikealRequest({
method: 'POST',
uri: 'http://example.com/resource',
headers: {
"X-Foo": 0
}
}, function(err, res, body) {
t.error(err);
t.equal(res.statusCode, 200);
t.end();
});

});

test('mocking succeeds even when host request header is not specified', function(t) {
var scope = nock('http://example.com')
.post('/resource')
Expand Down

0 comments on commit af96972

Please sign in to comment.