From: Tomas Doran Date: Sun, 5 Dec 2010 20:10:07 +0000 (+0000) Subject: Fix to pass tests against the psgi branch X-Git-Tag: 0.53~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FTest-WWW-Mechanize-Catalyst.git;a=commitdiff_plain;h=a3b9453026cd9dae3ea03bf664ae9532c2d38ad4 Fix to pass tests against the psgi branch --- diff --git a/CHANGES b/CHANGES index 1660729..aeb3a67 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,12 @@ Revision history for Perl module Test::WWW::Mechanize::Catalyst: + - Fix tests to work with the upcoming psgi based Catalyst release + as $c->req->header('Host') now more accurately reflects what you + see in a real web server (i.e. the port will not be defined if it + is 80) + - Fix tests to work when the CATALYST_DEBUG environment variable is + set by explicitly setting it to 0 in tests which require it. + 0.52 Mon Mar 8 01:25 GMT 2010 - Move actions out of the test applications to avoid deprecation warnings. - POD corrections by jhannah diff --git a/t/simple.t b/t/simple.t index 9ebc568..27bfd72 100644 --- a/t/simple.t +++ b/t/simple.t @@ -5,6 +5,10 @@ use warnings; use Encode qw(); use Test::More tests => 37; use lib 't/lib'; +BEGIN { + $ENV{CATALYST_DEBUG} = 0; + $ENV{CATTY_DEBUG} = 0; +} use Test::WWW::Mechanize::Catalyst 'Catty'; my $root = "http://localhost"; diff --git a/t/white_label.t b/t/white_label.t index 11c926d..1d0c392 100644 --- a/t/white_label.t +++ b/t/white_label.t @@ -9,8 +9,8 @@ my $m = Test::WWW::Mechanize::Catalyst->new(catalyst_app => 'Catty'); $m->host('foo.com'); $m->get_ok('/host'); -$m->content_contains('Host: foo.com:80'); +$m->content_contains('Host: foo.com'); $m->clear_host; $m->get_ok('/host'); -$m->content_contains('Host: localhost:80') or diag $m->content; +$m->content_contains('Host: localhost') or diag $m->content;