mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
77228: Fix authority browse/facet IT side effects
This commit is contained in:
@@ -225,6 +225,9 @@ public class BrowsesResourceControllerIT extends AbstractControllerIntegrationTe
|
||||
|
||||
@Test
|
||||
public void findBrowseBySubjectEntriesWithAuthority() throws Exception {
|
||||
String ogDcSubjectChoices = configurationService.getProperty("choices.plugin.dc.subject");
|
||||
String ogDcSubjectAuthorityControlled = configurationService.getProperty("authority.controlled.dc.subject");
|
||||
|
||||
configurationService.setProperty("choices.plugin.dc.subject",
|
||||
"SolrSubjectAuthority");
|
||||
configurationService.setProperty("authority.controlled.dc.subject",
|
||||
@@ -318,11 +321,19 @@ public class BrowsesResourceControllerIT extends AbstractControllerIntegrationTe
|
||||
jsonPath("$._embedded.entries",
|
||||
containsInAnyOrder(
|
||||
BrowseEntryResourceMatcher.matchBrowseEntry("Missionary studies", "VR110104", 1),
|
||||
BrowseEntryResourceMatcher.matchBrowseEntry("History of religion", "VR110102", 3),
|
||||
BrowseEntryResourceMatcher.matchBrowseEntry("Church studies", "VR110103", 2)
|
||||
BrowseEntryResourceMatcher.matchBrowseEntry("History of religion", "VR110102", 3),
|
||||
BrowseEntryResourceMatcher.matchBrowseEntry("Church studies", "VR110103", 2)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Clean up configuration for the following tests
|
||||
configurationService.setProperty("choices.plugin.dc.subject",
|
||||
ogDcSubjectChoices);
|
||||
configurationService.setProperty("authority.controlled.dc.subject",
|
||||
ogDcSubjectAuthorityControlled);
|
||||
|
||||
metadataAuthorityService.clearCache();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -1231,6 +1242,4 @@ public class BrowsesResourceControllerIT extends AbstractControllerIntegrationTe
|
||||
.andExpect(jsonPath("$._embedded.items[0]._embedded.owningCollection._embedded.adminGroup",
|
||||
nullValue()));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -188,6 +188,9 @@ public class DiscoveryRestControllerIT extends AbstractControllerIntegrationTest
|
||||
|
||||
@Test
|
||||
public void discoverFacetsAuthorWithAuthorityWithSizeParameter() throws Exception {
|
||||
String ogDcSubjectChoices = configurationService.getProperty("choices.plugin.dc.subject");
|
||||
String ogDcSubjectAuthorityControlled = configurationService.getProperty("authority.controlled.dc.subject");
|
||||
|
||||
configurationService.setProperty("choices.plugin.dc.subject",
|
||||
"SolrSubjectAuthority");
|
||||
configurationService.setProperty("authority.controlled.dc.subject",
|
||||
@@ -270,8 +273,15 @@ public class DiscoveryRestControllerIT extends AbstractControllerIntegrationTest
|
||||
.andExpect(jsonPath("$._embedded.values", containsInAnyOrder(
|
||||
FacetValueMatcher.entrySubject("History of religion", 3),
|
||||
FacetValueMatcher.entrySubject("Church studies", 2)
|
||||
)))
|
||||
;
|
||||
)));
|
||||
|
||||
// Clean up configuration for the following tests
|
||||
configurationService.setProperty("choices.plugin.dc.subject",
|
||||
ogDcSubjectChoices);
|
||||
configurationService.setProperty("authority.controlled.dc.subject",
|
||||
ogDcSubjectAuthorityControlled);
|
||||
|
||||
metadataAuthorityService.clearCache();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user