mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-22 14:09:25 +00:00
Separate forwarded~ and redirectedUrlTemplate methods
This commit restores and existing redirectedUrl and forwardedUrl methods (simple String comparison) and creates separate redirectedUrlTemplate and forwardedUrlTemplate methods that expand and also encode before comparing. Issue: SPR-15834
This commit is contained in:
+2
-2
@@ -38,7 +38,7 @@ public class MockMvcResultMatchersTests {
|
||||
|
||||
@Test
|
||||
public void redirectWithUrlTemplate() throws Exception {
|
||||
redirectedUrl("/orders/{orderId}/items/{itemId}", 1, 2).match(getRedirectedUrlStubMvcResult("/orders/1/items/2"));
|
||||
redirectedUrlTemplate("/orders/{orderId}/items/{itemId}", 1, 2).match(getRedirectedUrlStubMvcResult("/orders/1/items/2"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -63,7 +63,7 @@ public class MockMvcResultMatchersTests {
|
||||
|
||||
@Test
|
||||
public void forwardWithUrlTemplate() throws Exception {
|
||||
forwardedUrl("/orders/{orderId}/items/{itemId}", 1, 2).match(getForwardedUrlStubMvcResult("/orders/1/items/2"));
|
||||
forwardedUrlTemplate("/orders/{orderId}/items/{itemId}", 1, 2).match(getForwardedUrlStubMvcResult("/orders/1/items/2"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user