fixed unit test for new default redirect behavior
parent
2f31ceddf8
commit
c11e47a75b
|
@ -82,11 +82,15 @@ public class TestBlacklistAwareRedirectResolver {
|
|||
@Test
|
||||
public void testResolveRedirect_safe() {
|
||||
|
||||
// default uses prefix matching, both of these should work
|
||||
// default uses prefix matching, the first one should work fine
|
||||
|
||||
String res1 = resolver.resolveRedirect(goodUri, client);
|
||||
|
||||
assertThat(res1, is(equalTo(goodUri)));
|
||||
|
||||
// set the resolver to non-strict and test the path-based redirect resolution
|
||||
|
||||
resolver.setStrictMatch(false);
|
||||
|
||||
String res2 = resolver.resolveRedirect(pathUri, client);
|
||||
|
||||
|
@ -104,8 +108,7 @@ public class TestBlacklistAwareRedirectResolver {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRedirectMatches_strict() {
|
||||
resolver.setStrictMatch(true);
|
||||
public void testRedirectMatches_default() {
|
||||
|
||||
// this is not an exact match
|
||||
boolean res1 = resolver.redirectMatches(pathUri, goodUri);
|
||||
|
@ -120,8 +123,11 @@ public class TestBlacklistAwareRedirectResolver {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRedirectMatches_default() {
|
||||
public void testRedirectMatches_nonstrict() {
|
||||
|
||||
// set the resolver to non-strict match mode
|
||||
resolver.setStrictMatch(false);
|
||||
|
||||
// this is not an exact match (but that's OK)
|
||||
boolean res1 = resolver.redirectMatches(pathUri, goodUri);
|
||||
|
||||
|
|
Loading…
Reference in New Issue