Test valid inputs for all paths

This commit is contained in:
Jake 2015-02-10 21:45:46 -06:00
parent 9bebaff48e
commit c925082f7f
2 changed files with 8 additions and 1 deletions

View File

@ -92,7 +92,7 @@ var exp = {};
exp.boot = function(callback) { exp.boot = function(callback) {
var port = process.env.PORT || 3000; var port = process.env.PORT || 3000;
var bind_ip = process.env.BIND || "127.0.0.1"; 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() { server = http.createServer(requestHandler).listen(port, bind_ip, function() {
callback(); callback();
}); });

View File

@ -246,6 +246,13 @@ describe("Server", function() {
done(); 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 // testing all paths for default images