public void testDeployWarWithRedirect()
throws Exception
{
uploadServlet.uploadedResources.clear();
TomcatManager tomcatManager =
new TomcatManager( new URL( "http://localhost:" + this.redirectPort + "/foo/bar" ) );
redirectServlet.redirectPath = "http://localhost:" + this.port + "/foo/bar/redirected";
TomcatManagerResponse response =
tomcatManager.deploy( "foo", new File( getBasedir(), "src/test/resources/test.txt" ) );
assertEquals( 200, response.getStatusCode() );
assertEquals( "no request to redirect servlet", 1, redirectServlet.uploadedResources.size() );
assertEquals( "/foo/bar/deploy", redirectServlet.uploadedResources.get( 0 ).requestUri );