feat: begin implementing getReportsByAppId method

This commit is contained in:
Stevan Freeborn
2023-02-08 16:38:36 +00:00
parent b6605a4275
commit f0aeb51f60
7 changed files with 142 additions and 4 deletions
+41
View File
@@ -942,4 +942,45 @@ describe('ApiResponse', function () {
);
});
});
describe('asGetPagedReportsResponse', function () {
it('should be defined', function () {
expect(ApiResponse.prototype.asGetPagedReportsResponseType).to.not.be
.undefined;
});
it('should be a function', function () {
expect(ApiResponse.prototype.asGetPagedReportsResponseType).to.be.a(
'function'
);
});
it('should have no parameters', function () {
expect(
ApiResponse.prototype.asGetPagedReportsResponseType.length
).to.equal(0);
});
it('should return an ApiResponse<GetPagedReportsResponse>', function () {
const mockResponseData = [
{
appId: 1,
id: 1,
name: 'string',
description: 'description',
},
{
appId: 2,
id: 2,
name: 'string',
description: 'description'
}
]
const apiResponse = new ApiResponse(200, 'OK', mockResponseData);
const getPagedReportsResponse = apiResponse.asGetPagedReportsResponseType();
});
});
});