Skip to content

Commit

Permalink
add test for deletionRequestResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
WojciechGrancow committed Nov 15, 2023
1 parent bf68c68 commit adb77c9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { deletionRequestFactory } from '../../domain/testing/factory/deletion-request.factory';
import { DeletionRequestResponse } from './deletion-request.response';

describe(DeletionRequestResponse.name, () => {
describe('constructor', () => {
describe('when passed properties', () => {
const setup = () => {
const deletionRequest = deletionRequestFactory.build();
const deletionRequestResponse: DeletionRequestResponse = {
requestId: deletionRequest.id,
deletionPlannedAt: deletionRequest.deleteAfter,
};

return { deletionRequestResponse };
};

it('should set the id', () => {
const { deletionRequestResponse } = setup();

const deletionRequest = new DeletionRequestResponse(deletionRequestResponse);

expect(deletionRequest.requestId).toEqual(deletionRequestResponse.requestId);
});
});
});
});

0 comments on commit adb77c9

Please sign in to comment.