Skip to content

Commit

Permalink
[Fix] Fix broken tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ledsoft committed Aug 5, 2024
1 parent b0edc7b commit 10765cb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private Model initValidationModel(com.github.sgov.server.Validator validator, St
// Currently, only using content rules, not OntoUml, as TermIt does not support adding OntoUml rules
validator.getModelRules().stream()
.filter(r -> MODEL_RULES_TO_ADD.stream().anyMatch(s -> r.toString().contains(s)))
.collect(Collectors.toList())
.toList()
);
final Model validationModel = com.github.sgov.server.Validator.getRulesModel(rules);
loadOverrideRules(validationModel, language);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ void findAllRootsReturnsTermsInMultipleLanguagesWithoutPrimaryLabelInCorrectOrde
private void persistTerms(String lang, String... labels) {
transactional(() -> Arrays.stream(labels).forEach(label -> {
final Term parent = Generator.generateTermWithId();
parent.getLabel().set(lang, label);
parent.setLabel(MultilingualString.create(label, lang));
parent.setGlossary(vocabulary.getGlossary().getUri());
vocabulary.getGlossary().addRootTerm(parent);
em.merge(vocabulary.getGlossary(), descriptorFactory.glossaryDescriptor(vocabulary));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ void findEnhancesResultWithAccessLevelOfCurrentUser() {
@Test
void removeRemovesAccessControlList() {
final Vocabulary vocabulary = Generator.generateVocabularyWithId();
when(repositoryService.findRequired(vocabulary.getUri())).thenReturn(vocabulary);
final AccessControlList acl = Generator.generateAccessControlList(true);
when(aclService.findFor(vocabulary)).thenReturn(Optional.of(acl));

Expand Down

0 comments on commit 10765cb

Please sign in to comment.