Skip to content

Commit d641241

Browse files
committed
[DURACOM-448] Fix to restore urlPathSegmentEscaper
1 parent d467905 commit d641241

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

dspace-server-webapp/src/test/java/org/dspace/app/rest/DiscoveryRestControllerIT.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5885,9 +5885,11 @@ public void discoverFacetsTestWithDsoTypeTest() throws Exception {
58855885
.andExpect(jsonPath("$._embedded.values[0].label", is("2017 - 2020")))
58865886
.andExpect(jsonPath("$._embedded.values[0].count", is(3)))
58875887
.andExpect(jsonPath("$._embedded.values[0]._links.search.href",
5888-
containsString(
5889-
"api/discover/search/objects?dsoType=Item&configuration=default"
5890-
+ "&f.dateIssued=%5B2017%20TO%202020%5D,equals")))
5888+
containsString("api/discover/search/objects?dsoType=Item" +
5889+
"&configuration=default" +
5890+
"&f.dateIssued=" +
5891+
urlPathSegmentEscaper().escape("[2017 TO 2020],equals")
5892+
)))
58915893
.andExpect(jsonPath("$._embedded.values").value(Matchers.hasSize(1)));
58925894

58935895
}
@@ -6820,9 +6822,9 @@ public void discoverFacetsTestSameResultWithOrWithoutScope() throws Exception {
68206822
"api/discover/search/objects?scope=" +
68216823
author.getID().toString() +
68226824
"&configuration=RELATION.Person.researchoutputs" +
6823-
"&f.dateIssued=%5B2017%20TO%202020%5D,equals"
6824-
)
6825-
))
6825+
"&f.dateIssued=" +
6826+
urlPathSegmentEscaper().escape("[2017 TO 2020],equals")
6827+
)))
68266828
.andExpect(jsonPath("$._embedded.values").value(Matchers.hasSize(1)));
68276829

68286830
// finds the facets using the default configuration and
@@ -6850,9 +6852,9 @@ public void discoverFacetsTestSameResultWithOrWithoutScope() throws Exception {
68506852
containsString(
68516853
"api/discover/search/objects?configuration=default" +
68526854
"&f.author=" + author.getID().toString() + ",authority" +
6853-
"&f.dateIssued=%5B2017%20TO%202020%5D,equals"
6854-
)
6855-
))
6855+
"&f.dateIssued=" +
6856+
urlPathSegmentEscaper().escape("[2017 TO 2020],equals")
6857+
)))
68566858
.andExpect(jsonPath("$._embedded.values").value(Matchers.hasSize(1)));
68576859

68586860
}

0 commit comments

Comments
 (0)