Add test for HttpException
This commit is contained in:
parent
c98f357bba
commit
fff51ff95f
|
@ -1,4 +1,4 @@
|
|||
describe("", function () {
|
||||
describe("Typertext.Http.HttpException", function () {
|
||||
it("exists", function () {
|
||||
expect(typeof Typertext.Http.HttpException).toEqual("function");
|
||||
});
|
||||
|
|
16
test/Typertext/Http/HttpResponse.test.js
Normal file
16
test/Typertext/Http/HttpResponse.test.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
describe("", function () {
|
||||
it("exists", function () {
|
||||
expect(typeof Typertext.Http.HttpException).toEqual("function");
|
||||
});
|
||||
|
||||
it("works according to the parent class", function () {
|
||||
var inputString = "Test message",
|
||||
inputCode = 239,
|
||||
inputHttp = Typertext.Http.HttpResponseStatus.clientError;
|
||||
var testClass = new Typertext.Http.HttpException(inputString, inputCode, inputHttp);
|
||||
|
||||
expect(testClass.GetCode()).toEqual(inputCode);
|
||||
expect(testClass.GetCustom()).toEqual(inputHttp);
|
||||
expect(testClass.GetMessage()).toEqual(inputString);
|
||||
});
|
||||
});
|
Reference in a new issue