Permalink
Browse files

After pulling changes, tests now work again.

  • Loading branch information...
1 parent b3e60a5 commit 71ed4ec950d1a8268f82ff954d4dd67745773d2a @streunerlein streunerlein committed May 29, 2012
Showing with 4 additions and 5 deletions.
  1. +3 −2 tests/helpers.js
  2. +1 −3 tests/shared/headers.js
View
@@ -82,12 +82,13 @@ helpers.nock = function helpersNock(url, fixture) {
return "*";
})[method](npath, "*").reply(status, response, headers);
} else {
+ var n = nock(url);
if(reqheaders !== {}) {
for (var k in reqheaders) {
- nock(url).matchHeader(k, reqheaders[k]);
+ n = n.matchHeader(k, reqheaders[k]);
}
}
- nock(url)[method](npath, body).reply(status, response, headers);
+ n[method](npath, body).reply(status, response, headers);
}
});
nock(url).log(console.log);
View
@@ -27,9 +27,7 @@ specify("shared_headers:test", timeout, function (assert) {
db: "shared_headers",
doc: "new",
att: "att",
- // should be JSON.stringify(hello.rev)
- // this should fail npm test
- headers: { "If-None-Match": "FooBAR" }
+ headers: { "If-None-Match": JSON.stringify(hello.rev) }
},
function (error, helloWorld, rh) {
assert.equal(error, undefined, "Should get the hello");

0 comments on commit 71ed4ec

Please sign in to comment.