"use strict";

var HttpError = require("./error");
var assert = require("assert");


describe("HttpError", function() {
    it("Should return an error object", function() {
        var err = new HttpError.NotFound("Ding Boom Bats");

        assert.equal(err.code, 404);
        assert.equal(err.defaultMessage, "Not Found");
        assert.equal(err.message, "Ding Boom Bats");
    });

    it("Should blow up in your face when not called as constructor", function() {
        assert.throws(function() {
            HttpError.NotFound("foo");
        }, "Must be called as constructor", "You must call as a constructor");
    });
})
@@ -624,10 +624,227 @@
     %7D);%0A
+    %0A    it(%22Should set augment through constructor%22, function() %7B%0A        var err = new HttpError.InternalServerError(%22Ding Boom Bats%22, %7B augment: %22foo%22 %7D);%0A        %0A        assert.equal(err.augment, %22foo%22);%0A    %7D);%0A
 %7D)

Add test