fix: begin writing Lists integration tests. fix: list item response model's id value should be of type string so modified the created with id response model that it extends so that the id property is generically typed and type can be passed in.
This commit is contained in:
@@ -780,7 +780,7 @@ describe('ApiResponse', function () {
|
||||
const createdWithIdResponse = apiResponse.asCreatedWithIdResponseType();
|
||||
|
||||
expect(createdWithIdResponse).to.be.instanceOf(
|
||||
ApiResponse<CreatedWithIdResponse>
|
||||
ApiResponse<CreatedWithIdResponse<any>>
|
||||
);
|
||||
expect(createdWithIdResponse.data).to.be.instanceOf(
|
||||
CreatedWithIdResponse
|
||||
|
||||
@@ -12,7 +12,7 @@ describe('ListItemResponse', function () {
|
||||
});
|
||||
|
||||
it('should have a constructor that takes an id and sets the id property', function () {
|
||||
const id = 1;
|
||||
const id = '3fa85f64-5717-4562-b3fc-2c963f66afa6';
|
||||
const listItemResponse = new ListItemResponse(id);
|
||||
expect(listItemResponse).to.have.property('id', id);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user