Skip to content

Commit

Permalink
The default value of the previewing the file must be true in the inte…
Browse files Browse the repository at this point in the history
…gration tests.
  • Loading branch information
milanmajchrak committed Dec 15, 2023
1 parent 1635bae commit eca99f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dspace-api/src/test/data/dspaceFolder/config/local.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,8 @@ lr.pid.community.configurations = community=*, prefix=123456789, type=local, can
#### Authority configuration `authority.cfg`
authority.controlled.dc.relation = true

handle.canonical.prefix = ${dspace.ui.url}/handle/
handle.canonical.prefix = ${dspace.ui.url}/handle/

### File preview ###
# File preview is enabled by default
file.preview.enabled = true
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public void findByHandle() throws Exception {

@Test
public void previewingIsDisabledByCfg() throws Exception {
boolean canPreview = configurationService.getBooleanProperty("file.preview.enabled", true);
// Disable previewing
configurationService.setProperty("file.preview.enabled", false);
// There is no restriction, so the user could preview the file
Expand Down Expand Up @@ -158,6 +159,8 @@ public void previewingIsDisabledByCfg() throws Exception {
.value(Matchers.containsInAnyOrder(Matchers.containsString(bts.getChecksum()))))
.andExpect(jsonPath("$._embedded.metadatabitstreams[*].href")
.value(Matchers.containsInAnyOrder(Matchers.containsString(url))));

configurationService.setProperty("file.preview.enabled", canPreview);
}

@Test
Expand Down

0 comments on commit eca99f2

Please sign in to comment.