Skip to content

Commit

Permalink
adjusted tests for text/plain response
Browse files Browse the repository at this point in the history
  • Loading branch information
Clarence Leung committed Jun 4, 2012
1 parent ed12742 commit cf517d4
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions test/messenger.js
Expand Up @@ -16,8 +16,8 @@ vows.describe("Yeti Hub HTTP errors").addBatch({
}),
"should return a 405 error" : pact.code(405),
"should return the proper error message" : function (topic) {
assert.equal(topic.body, "/* Method Not Allowed\n" +
"GET or HEAD method required. */");
assert.equal(topic.body, "Method Not Allowed\n" +
"GET or HEAD method required.");
}
},
"when the desired route is not found" : {
Expand All @@ -26,8 +26,17 @@ vows.describe("Yeti Hub HTTP errors").addBatch({
}),
"should return a 404 error" : pact.code(404),
"should return the proper error message" : function (topic) {
assert.equal(topic.body, "/* Not Found\n" +
"Unable to find what you're looking for. */");
assert.equal(topic.body, "Not Found\n" +
"Unable to find what you're looking for.");
}
},
"when a HEAD request is not found" : {
topic : pact.request({
url : "/foobar",
method : "HEAD"
}),
"should end with no message" : function (topic) {
assert.equal(topic.body, "");
}
}
}
Expand Down

0 comments on commit cf517d4

Please sign in to comment.