Skip to content
Snippets Groups Projects
Commit 0c3210b0 authored by OZGCloud's avatar OZGCloud
Browse files

prj-42 fix it case

parent 05533df2
Branches
Tags
No related merge requests found
......@@ -64,6 +64,7 @@ class VorgangAttachedItemITCase {
@Autowired
private GrpcVorgangAttachedItemService service;
@MockBean
private CurrentUserService currentUserService;
@Autowired
......@@ -173,11 +174,13 @@ class VorgangAttachedItemITCase {
assertDoesNotThrow(() -> doFind());
}
// TODO remove this Test. Implement PoicyServiceITCase to test permission check
// and verify service call in Unit Test
@Test
void shouldThrowAccessDeniedException() {
var user = CallContextUserTestFactory.createBuilder()
.organisationEinheitenIdCheckNecessary(true)
.organisatorischeEinheitenId("doesNotMatch")
.clearOrganisatorischeEinheitenIds().organisatorischeEinheitenId("doesNotMatch")
.build();
when(currentUserService.findUser()).thenReturn(Optional.of(user));
......@@ -233,7 +236,7 @@ class VorgangAttachedItemITCase {
@Test
void shouldThrowAccessDeniedException() {
var user = CallContextUserTestFactory.createBuilder()
.organisatorischeEinheitenId("doesNotMatch")
.clearOrganisatorischeEinheitenIds().organisatorischeEinheitenId("doesNotMatch")
.build();
when(currentUserService.findUser()).thenReturn(Optional.of(user));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment