#1903 - Test case to reproduce unquoted link attribute parsing bug.
This commit is contained in:
committed by
Oliver Drotbohm
parent
88da996857
commit
ceb18ce943
@@ -54,6 +54,12 @@ class LinksUnitTest {
|
||||
static final Links reference2 = Links.of(Link.of("/something", "foo").withHreflang("en"),
|
||||
Link.of("/somethingElse", "bar").withHreflang("de"));
|
||||
|
||||
// #1899
|
||||
static final String FIVE = "</somethingElse>;rel=boo";
|
||||
static final String SIX = "</somethingElse>; rel=bee";
|
||||
static final String LINKS3 = StringUtils.collectionToCommaDelimitedString(Arrays.asList(FIVE, SIX));
|
||||
static final Links reference3 = Links.of(Link.of("/somethingElse", "boo"), Link.of("/somethingElse", "bee"));
|
||||
|
||||
@Test
|
||||
void parsesLinkHeaderLinks() {
|
||||
|
||||
@@ -264,6 +270,11 @@ class LinksUnitTest {
|
||||
.isEqualTo("https://url.com?page=1");
|
||||
}
|
||||
|
||||
@Test // #1899
|
||||
void parsesMultipleLinksContainingUnquotedRels() {
|
||||
assertThat(Links.parse(LINKS3)).isEqualTo(reference3);
|
||||
}
|
||||
|
||||
@Value(staticConstructor = "of")
|
||||
static class NamedLinks {
|
||||
String name;
|
||||
|
||||
Reference in New Issue
Block a user