Skip to content

Commit

Permalink
Make the 404 test explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
squaremo committed Feb 15, 2012
1 parent b6521c1 commit 44dbf57
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion Makefile
Expand Up @@ -5,4 +5,3 @@ test: node_modules/mocha

node_modules/mocha: node_modules/%:
npm install $(@F)

4 changes: 4 additions & 0 deletions mockserver.js
Expand Up @@ -25,6 +25,10 @@ function handle(req, res) {
sendSubscriptionVerification(params);
});
}
else if (req.url == '/subscribe404' && req.method == 'POST') {
res.statusCode = 404;
res.end();
}
else {
res.statusCode = 404;
res.end();
Expand Down
4 changes: 2 additions & 2 deletions test/subscriber.js
Expand Up @@ -50,9 +50,9 @@ suite("Default subscriber", function() {
});
});

test("bogus", function(done) {
test("404", function(done) {
var topic = cons_topic();
listener.subscribe("http://localhost:8000/bogus",
listener.subscribe("http://localhost:8000/subscribe404",
topic,
{},
function(_path) {
Expand Down

0 comments on commit 44dbf57

Please sign in to comment.