mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-22 07:51:17 +01:00
Asset request, describe more tests
This commit is contained in:
parent
84701567b5
commit
cac316aeb3
11
test/test.js
11
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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user