From c925082f7ff599a128e8729dfad99dc1276f5d2d Mon Sep 17 00:00:00 2001 From: Jake Date: Tue, 10 Feb 2015 21:45:46 -0600 Subject: [PATCH] Test valid inputs for all paths --- server.js | 2 +- test/test.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 325b9eb..c6c49bd 100644 --- a/server.js +++ b/server.js @@ -92,7 +92,7 @@ var exp = {}; exp.boot = function(callback) { var port = process.env.PORT || 3000; var bind_ip = process.env.BIND || "127.0.0.1"; - console.log("Server running on http://" + bind_ip + ":" + port + "/"); + logging.log("Server running on http://" + bind_ip + ":" + port + "/"); server = http.createServer(requestHandler).listen(port, bind_ip, function() { callback(); }); diff --git a/test/test.js b/test/test.js index 8e933ec..e057142 100644 --- a/test/test.js +++ b/test/test.js @@ -246,6 +246,13 @@ describe("Server", function() { done(); }); }); + + it("should return a 200 (valid input)", function(done) { + request.get("http://localhost:3000/" + location + "/Jake0oo0", function(error, res, body) { + assert.equal(200, res.statusCode); + done(); + }); + }); } // testing all paths for default images