diff --git a/Makefile b/Makefile index 5567809..2310e6a 100644 --- a/Makefile +++ b/Makefile @@ -5,4 +5,3 @@ test: node_modules/mocha node_modules/mocha: node_modules/%: npm install $(@F) - diff --git a/mockserver.js b/mockserver.js index a538a71..17606fd 100644 --- a/mockserver.js +++ b/mockserver.js @@ -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(); diff --git a/test/subscriber.js b/test/subscriber.js index f8d0c98..1d8c691 100644 --- a/test/subscriber.js +++ b/test/subscriber.js @@ -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) {