Make Action active field convertor JPA Vendor portable (#2132)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -65,9 +65,9 @@ public enum ActionFields implements RsqlQueryField, FieldValueConverter<ActionFi
|
||||
private static Object convertStatusValue(final String value) {
|
||||
final String trimmedValue = value.trim();
|
||||
if (trimmedValue.equalsIgnoreCase(ACTIVE)) {
|
||||
return 1;
|
||||
return true;
|
||||
} else if (trimmedValue.equalsIgnoreCase(INACTIVE)) {
|
||||
return 0;
|
||||
return false;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ class DistributionSetAccessControllerTest extends AbstractAccessControllerTest {
|
||||
assertThat(distributionSetManagement.findByTag(Pageable.unpaged(), dsTag.getId()).get().map(Identifiable::getId)
|
||||
.toList()).containsOnly(permitted.getId(), readOnly.getId());
|
||||
|
||||
assertThat(distributionSetManagement.findByRsqlAndTag(Pageable.unpaged(), "id==*", dsTag.getId()).get()
|
||||
assertThat(distributionSetManagement.findByRsqlAndTag(Pageable.unpaged(), "name==*", dsTag.getId()).get()
|
||||
.map(Identifiable::getId).toList()).containsOnly(permitted.getId(), readOnly.getId());
|
||||
|
||||
// verify distributionSetManagement#unassignTag on permitted target
|
||||
|
||||
@@ -52,7 +52,7 @@ class TargetTypeAccessControllerTest extends AbstractAccessControllerTest {
|
||||
.containsOnly(permittedTargetType.getId());
|
||||
|
||||
// verify targetTypeManagement#findByRsql
|
||||
assertThat(targetTypeManagement.findByRsql(Pageable.unpaged(), "id==*").get().map(Identifiable::getId).toList())
|
||||
assertThat(targetTypeManagement.findByRsql(Pageable.unpaged(), "name==*").get().map(Identifiable::getId).toList())
|
||||
.containsOnly(permittedTargetType.getId());
|
||||
|
||||
// verify targetTypeManagement#findByName
|
||||
|
||||
Reference in New Issue
Block a user