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:
EthanHealy01
2026-07-06 19:43:57 +01:00
parent 75464f453d
commit 293a6978f3
2 changed files with 2 additions and 2 deletions
@@ -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 =
@@ -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 =