Asset request, describe more tests

This commit is contained in:
Jake 2015-02-09 22:33:43 -06:00
parent 84701567b5
commit cac316aeb3

View File

@ -183,15 +183,22 @@ describe("Server", function() {
});
// Test the home page
it("should return a 200", function(done) {
it("should return a 200 (home page)", function(done) {
request.get("http://localhost:3000", function(error, res, body) {
assert.equal(200, res.statusCode);
done();
});
});
it("should return a 200 (asset request)", function(done) {
request.get("http://localhost:3000/stylesheets/style.css", function(error, res, body) {
assert.equal(200, res.statusCode);
done();
});
});
// invalid method, we only allow GET and HEAD requests
it("should return a 405", function(done) {
it("should return a 405 (invalid method)", function(done) {
request.post("http://localhost:3000", function(error, res, body) {
assert.equal(405, res.statusCode);
done();