String filterManagedUser = underTest.getManagedGroupSqlFilter(true);
assertThat(filterManagedUser).isEqualTo(
"(exists (select group_uuid from external_groups eg where eg.group_uuid = uuid) "
- + "or exists (select group_uuid from github_orgs_groups gog eg where gog.group_uuid = uuid))");
+ + "or exists (select group_uuid from github_orgs_groups gog where gog.group_uuid = uuid))");
}
@Test
String filterNonManagedUser = underTest.getManagedGroupSqlFilter(false);
assertThat(filterNonManagedUser).isEqualTo(
"(not exists (select group_uuid from external_groups eg where eg.group_uuid = uuid) "
- + "and not exists (select group_uuid from github_orgs_groups gog eg where gog.group_uuid = uuid))");
+ + "and not exists (select group_uuid from github_orgs_groups gog where gog.group_uuid = uuid))");
}
private List<ExternalGroupDto> createAndInsertExternalGroupDtos(String provider, int numberOfGroups) {
public String getManagedGroupSqlFilter(boolean filterByManaged) {
if (filterByManaged) {
return "(exists (select group_uuid from external_groups eg where eg.group_uuid = uuid) "
- + "or exists (select group_uuid from github_orgs_groups gog eg where gog.group_uuid = uuid))";
+ + "or exists (select group_uuid from github_orgs_groups gog where gog.group_uuid = uuid))";
}
return "(not exists (select group_uuid from external_groups eg where eg.group_uuid = uuid) "
- + "and not exists (select group_uuid from github_orgs_groups gog eg where gog.group_uuid = uuid))";
+ + "and not exists (select group_uuid from github_orgs_groups gog where gog.group_uuid = uuid))";
}
public void deleteByExternalIdentityProvider(DbSession dbSession, String externalIdentityProvider) {