-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for deletionRequestResponse
- Loading branch information
1 parent
bf68c68
commit adb77c9
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
26 changes: 26 additions & 0 deletions
26
apps/server/src/modules/deletion/controller/dto/deletion-request.response.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); | ||
}); | ||
}); | ||
}); |