Skip to content

Commit

Permalink
Merge pull request DSpace#9220 from ksankeerth/dev-9215
Browse files Browse the repository at this point in the history
fix: Failure of org.dspace.app.rest.SitemapRestControllerIT when running locally
  • Loading branch information
alanorth authored Dec 8, 2023
2 parents b2dfa9f + 44fc15f commit 344d79b
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,12 @@ public void testSitemap_sitemapIndexXml() throws Exception {
//** THEN **
.andExpect(status().isOk())
//We expect the content type to match
.andExpect(content().contentType("application/xml;charset=UTF-8"))
.andExpect(res -> {
String actual = res.getResponse().getContentType();
assertTrue("Content Type",
"text/xml;charset=UTF-8".equals(actual) ||
"application/xml;charset=UTF-8".equals(actual));
})
.andReturn();

String response = result.getResponse().getContentAsString();
Expand All @@ -232,7 +237,12 @@ public void testSitemap_sitemap0Xml() throws Exception {
//** THEN **
.andExpect(status().isOk())
//We expect the content type to match
.andExpect(content().contentType("application/xml;charset=UTF-8"))
.andExpect(res -> {
String actual = res.getResponse().getContentType();
assertTrue("Content Type",
"text/xml;charset=UTF-8".equals(actual) ||
"application/xml;charset=UTF-8".equals(actual));
})
.andReturn();

String response = result.getResponse().getContentAsString();
Expand Down

0 comments on commit 344d79b

Please sign in to comment.