Add test for JsonResponse
This commit is contained in:
parent
a85f3bf021
commit
c98f357bba
16
test/Typertext/Http/HttpException.test.js
Normal file
16
test/Typertext/Http/HttpException.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