Fix to pass tests against the psgi branch
Tomas Doran [Sun, 5 Dec 2010 20:10:07 +0000 (20:10 +0000)]
CHANGES
t/simple.t
t/white_label.t

diff --git a/CHANGES b/CHANGES
index 1660729..aeb3a67 100644 (file)
--- 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
index 9ebc568..27bfd72 100644 (file)
@@ -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";
index 11c926d..1d0c392 100644 (file)
@@ -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;