From: Florian Ragwitz Date: Wed, 2 Mar 2011 13:11:05 +0000 (+0100) Subject: Remove testsuite's assumptions about where it's mounted on a web server X-Git-Tag: 5.89003~92 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=c09cc357c51103a02a4a97cece61dc1bc53877e5 Remove testsuite's assumptions about where it's mounted on a web server --- diff --git a/t/aggregate/live_component_controller_action_forward.t b/t/aggregate/live_component_controller_action_forward.t index 3d838b8..d968965 100644 --- a/t/aggregate/live_component_controller_action_forward.t +++ b/t/aggregate/live_component_controller_action_forward.t @@ -242,7 +242,7 @@ sub run_tests { 'forward_to_uri_check request'); ok( $response->is_success, 'forward_to_uri_check successful'); - is( $response->content, '/action/forward/foo/bar', + is( $response->content, 'action/forward/foo/bar', 'forward_to_uri_check correct namespace'); } diff --git a/t/aggregate/live_component_controller_action_regexp.t b/t/aggregate/live_component_controller_action_regexp.t index 36a679e..fd65665 100644 --- a/t/aggregate/live_component_controller_action_regexp.t +++ b/t/aggregate/live_component_controller_action_regexp.t @@ -131,11 +131,9 @@ sub run_tests { 'TestApp::Controller::Action::Regexp', 'Test Class' ); - my $location = $response->header('location'); - $location =~ s/localhost(:\d+)?/localhost/; is( - $location, - $url, + $response->header('location'), + $response->request->uri, 'Redirect URI is the same as the request URI' ); } diff --git a/t/lib/TestApp/Controller/Action/ForwardTo.pm b/t/lib/TestApp/Controller/Action/ForwardTo.pm index 92db7f2..37a7055 100644 --- a/t/lib/TestApp/Controller/Action/ForwardTo.pm +++ b/t/lib/TestApp/Controller/Action/ForwardTo.pm @@ -5,7 +5,7 @@ use base 'TestApp::Controller::Action'; sub uri_check : Private { my ( $self, $c ) = @_; - $c->res->body( $c->uri_for('foo/bar')->path ); + $c->res->body( $c->uri_for('foo/bar')->rel($c->req->base)->path ); } 1;