-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6987538
commit 4310b7a
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/modules/personenkontext/domain/error/update-invalid-last-modified.error.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,25 @@ | ||
import { PersonenkontexteUpdateError } from './personenkontexte-update.error.js'; | ||
import { UpdateInvalidLastModifiedError } from './update-invalid-last-modified.error.js'; | ||
|
||
describe('UpdateInvalidLastModified', () => { | ||
it('should create an instance of UpdateInvalidLastModifiedError', () => { | ||
const error: UpdateInvalidLastModifiedError = new UpdateInvalidLastModifiedError(); | ||
|
||
expect(error).toBeInstanceOf(UpdateInvalidLastModifiedError); | ||
expect(error).toBeInstanceOf(PersonenkontexteUpdateError); | ||
}); | ||
|
||
it('should have the correct error message', () => { | ||
const error: UpdateInvalidLastModifiedError = new UpdateInvalidLastModifiedError(); | ||
|
||
expect(error.message).toBe( | ||
'Personenkontexte could not be updated because the sent lastModified value is invalid!', | ||
); | ||
}); | ||
|
||
it('should handle no details gracefully', () => { | ||
const error: UpdateInvalidLastModifiedError = new UpdateInvalidLastModifiedError(); | ||
|
||
expect(error.details).toBeUndefined(); | ||
}); | ||
}); |