Skip to content

Commit

Permalink
LPS-86324 testSetDefaultTitleIsDisplayedWhenAcceptLanguageIsNotSpecified
Browse files Browse the repository at this point in the history
  • Loading branch information
ruben-pulido committed Oct 11, 2018
1 parent 4a69a9c commit 1c0ad07
Showing 1 changed file with 24 additions and 0 deletions.
Expand Up @@ -229,6 +229,30 @@ public void testNotSiteMemberUserSeesRightStructuredContents()
TITLE_YES_GUEST_YES_GROUP));
}

@Test
public void testSetDefaultTitleIsDisplayedWhenAcceptLanguageIsNotSpecified()
throws Exception {

List<String> hrefs = JsonPath.read(
_toStringAsAdmin(
JsonPath.read(
_toStringAsAdmin(_rootEndpointURL.toExternalForm()),
"$._links.content-space.href")),
"$._embedded.ContentSpace[?(@.name == '" +
StructuredContentApioTestBundleActivator.SITE_NAME +
"')]._links.structuredContents.href");

Map<String, String> headersMap = _getDefaultHeadersMap();

List<String> titles = JsonPath.read(
_toStringAsGuest(hrefs.get(0), headersMap),
"$._embedded.StructuredContent[*].title");

Assert.assertTrue(
titles.contains(
StructuredContentApioTestBundleActivator.TITLE1_LOCALE_ES));
}

@Test
public void testSiteMemberUserSeesRightStructuredContents()
throws Exception {
Expand Down

0 comments on commit 1c0ad07

Please sign in to comment.