=htp #18661 effectiveUri in Java testkit
Java testkit now uses effectiveUri to behave just like the Scala testkit so that the host header and path is joined. This allows for test calls that use just a relative URI.
This commit is contained in:
parent
630bd948d5
commit
19c8e557ba
6 changed files with 49 additions and 22 deletions
|
|
@ -49,14 +49,14 @@ public class HandlerExampleDocTest extends JUnitRouteTest {
|
|||
TestRoute r = testRoute(new TestHandler().createRoute());
|
||||
r.run(HttpRequest.GET("/test"))
|
||||
.assertStatusCode(200)
|
||||
.assertEntity("This was a GET request to /test");
|
||||
.assertEntity("This was a GET request to http://example.com/test");
|
||||
|
||||
r.run(HttpRequest.POST("/test"))
|
||||
.assertStatusCode(404);
|
||||
|
||||
r.run(HttpRequest.POST("/abc"))
|
||||
.assertStatusCode(200)
|
||||
.assertEntity("This was a POST request to /abc");
|
||||
.assertEntity("This was a POST request to http://example.com/abc");
|
||||
//#simple-handler-example-full
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue