mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-22 07:51:17 +01:00
Test valid inputs for all paths
This commit is contained in:
parent
9bebaff48e
commit
c925082f7f
@ -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();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user