Skip to content

Commit

Permalink
unit tests only, no integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
d-bernat committed Nov 4, 2024
1 parent a03b023 commit dde5eab
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ void testGetUserOrgUnitsWithNoAnalyticsOrganisationUnitsDefined() {
DataQueryParams.newBuilder().withUserOrgUnitType(DATA_OUTPUT).build();
User currentUser = mock(User.class);
AnalyticsSecurityManager analyticsSecurityManager = mock(AnalyticsSecurityManager.class);
when(currentUser.getDataViewOrganisationUnits()).thenReturn(Set.of(ouA));
when(currentUser.getOrganisationUnits()).thenReturn(Set.of(ouA));
when(currentUser.getDataViewOrganisationUnits()).thenReturn(Set.of());
when(analyticsSecurityManager.getCurrentUser(dataQueryParams)).thenReturn(currentUser);
DataQueryService dataQueryService =
new DefaultDataQueryService(
Expand All @@ -113,6 +114,7 @@ void testGetUserOrgUnitsWithNoneOrganisationUnitDefined() {
DataQueryParams.newBuilder().withUserOrgUnitType(DATA_OUTPUT).build();
User currentUser = mock(User.class);
AnalyticsSecurityManager analyticsSecurityManager = mock(AnalyticsSecurityManager.class);
when(currentUser.getOrganisationUnits()).thenReturn(Set.of());
when(currentUser.getDataViewOrganisationUnits()).thenReturn(Set.of());
when(analyticsSecurityManager.getCurrentUser(dataQueryParams)).thenReturn(currentUser);
DataQueryService dataQueryService =
Expand Down

0 comments on commit dde5eab

Please sign in to comment.