Fix overview-service tests for requireCurrentUserTeamId()
PolicyOverviewServiceTest and SourceOverviewServiceTest stub the authority and reach team scoping only through the guards' visibleFrom(), which now calls requireCurrentUserTeamId() — re-point their stubs to match. (Full :proprietary and :saas suites green.)
This commit is contained in:
+1
-1
@@ -119,7 +119,7 @@ class PolicyOverviewServiceTest {
|
||||
properties.getSecurity().setEnableLogin(true);
|
||||
UserServiceInterface userService = mock(UserServiceInterface.class);
|
||||
PolicyManagementAuthority authority = mock(PolicyManagementAuthority.class);
|
||||
when(authority.currentUserTeamId()).thenReturn(1L);
|
||||
when(authority.requireCurrentUserTeamId()).thenReturn(1L);
|
||||
SourceAccessGuard sourceGuard = new SourceAccessGuard(userService, properties, authority);
|
||||
PolicyAccessGuard policyGuard = new PolicyAccessGuard(userService, properties, authority);
|
||||
PolicyOverviewService scoped =
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ class SourceOverviewServiceTest {
|
||||
properties.getSecurity().setEnableLogin(true);
|
||||
UserServiceInterface userService = mock(UserServiceInterface.class);
|
||||
PolicyManagementAuthority authority = mock(PolicyManagementAuthority.class);
|
||||
when(authority.currentUserTeamId()).thenReturn(1L);
|
||||
when(authority.requireCurrentUserTeamId()).thenReturn(1L);
|
||||
SourceAccessGuard sourceGuard = new SourceAccessGuard(userService, properties, authority);
|
||||
PolicyAccessGuard policyGuard = new PolicyAccessGuard(userService, properties, authority);
|
||||
SourceOverviewService scoped =
|
||||
|
||||
Reference in New Issue
Block a user