From cac316aeb36b1d7608e798a204bf5fb221a0843c Mon Sep 17 00:00:00 2001 From: Jake Date: Mon, 9 Feb 2015 22:33:43 -0600 Subject: [PATCH] Asset request, describe more tests --- test/test.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/test.js b/test/test.js index df2b5b1..89ad12b 100644 --- a/test/test.js +++ b/test/test.js @@ -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();