From: Tomas Doran Date: Sat, 30 Jun 2012 15:55:02 +0000 (+0100) Subject: Test fixes - how did this ever pass before? X-Git-Tag: 0.58~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FTest-WWW-Mechanize-Catalyst.git;a=commitdiff_plain;h=4ab99758ded1e8345f86ad675880e44aca82dac5 Test fixes - how did this ever pass before? --- diff --git a/t/lib/ExternalCatty/Controller/Root.pm b/t/lib/ExternalCatty/Controller/Root.pm index 882b81d..0409a7a 100644 --- a/t/lib/ExternalCatty/Controller/Root.pm +++ b/t/lib/ExternalCatty/Controller/Root.pm @@ -33,5 +33,14 @@ sub html { ]; } +sub host : Global { + my ($self, $c) = @_; + + my $host = $c->req->header('Host') || ""; + my $html = html( $c->config->{name}, "Host: $host" ); + $c->response->content_type("text/html"); + $c->response->output($html); +} + 1; diff --git a/t/multi_content_type.t b/t/multi_content_type.t index 097dce9..47cba51 100644 --- a/t/multi_content_type.t +++ b/t/multi_content_type.t @@ -60,7 +60,7 @@ SKIP: { is($m->uri, "$ENV{CATALYST_SERVER}/"); $m->get_ok( '/host' ); - $m->content_contains('Host: localhost:$PORT') or diag $m->content; + $m->content_contains("Host: localhost:$PORT") or diag $m->content; }