-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into j-s/remove-prosecutor-update-option-when-rev…
…iewed
- Loading branch information
Showing
16 changed files
with
335 additions
and
53 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
29 changes: 29 additions & 0 deletions
29
...app/modules/subpoena/test/internalSubpoenaController/deliverSubpoanaToCourtGuards.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,29 @@ | ||
import { indictmentCases } from '@island.is/judicial-system/types' | ||
|
||
import { CaseExistsGuard, CaseTypeGuard } from '../../../case' | ||
import { DefendantExistsGuard } from '../../../defendant' | ||
import { SubpoenaExistsGuard } from '../../guards/subpoenaExists.guard' | ||
import { InternalSubpoenaController } from '../../internalSubpoena.controller' | ||
|
||
describe('InternalSubpoenaController - Deliver subpoena to court guards', () => { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
let guards: any[] | ||
|
||
beforeEach(() => { | ||
guards = Reflect.getMetadata( | ||
'__guards__', | ||
InternalSubpoenaController.prototype.deliverSubpoenaToCourt, | ||
) | ||
}) | ||
|
||
it('should have the right guard configuration', () => { | ||
expect(guards).toHaveLength(4) | ||
expect(new guards[0]()).toBeInstanceOf(CaseExistsGuard) | ||
expect(guards[1]).toBeInstanceOf(CaseTypeGuard) | ||
expect(guards[1]).toEqual({ | ||
allowedCaseTypes: indictmentCases, | ||
}) | ||
expect(new guards[2]()).toBeInstanceOf(DefendantExistsGuard) | ||
expect(new guards[3]()).toBeInstanceOf(SubpoenaExistsGuard) | ||
}) | ||
}) |
29 changes: 29 additions & 0 deletions
29
...pp/modules/subpoena/test/internalSubpoenaController/deliverSubpoanaToPoliceGuards.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,29 @@ | ||
import { indictmentCases } from '@island.is/judicial-system/types' | ||
|
||
import { CaseExistsGuard, CaseTypeGuard } from '../../../case' | ||
import { DefendantExistsGuard } from '../../../defendant' | ||
import { SubpoenaExistsGuard } from '../../guards/subpoenaExists.guard' | ||
import { InternalSubpoenaController } from '../../internalSubpoena.controller' | ||
|
||
describe('InternalSubpoenaController - Deliver subpoena to police guards', () => { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
let guards: any[] | ||
|
||
beforeEach(() => { | ||
guards = Reflect.getMetadata( | ||
'__guards__', | ||
InternalSubpoenaController.prototype.deliverSubpoenaToPolice, | ||
) | ||
}) | ||
|
||
it('should have the right guard configuration', () => { | ||
expect(guards).toHaveLength(4) | ||
expect(new guards[0]()).toBeInstanceOf(CaseExistsGuard) | ||
expect(guards[1]).toBeInstanceOf(CaseTypeGuard) | ||
expect(guards[1]).toEqual({ | ||
allowedCaseTypes: indictmentCases, | ||
}) | ||
expect(new guards[2]()).toBeInstanceOf(DefendantExistsGuard) | ||
expect(new guards[3]()).toBeInstanceOf(SubpoenaExistsGuard) | ||
}) | ||
}) |
Oops, something went wrong.