X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=FS-Test%2Flib%2FFS%2FTest.pm;h=aedf502b5d7170c35b65f135a33d98bb09d31aa4;hb=008060cdb11cbd68141326920439864708d04981;hp=445fdb62c9e6f6bc0b42b56d210e3c7d0e7c8e74;hpb=5d9e9f9a6fb8c4bc1db111e5b8a295b8f3ff6a08;p=freeside.git diff --git a/FS-Test/lib/FS/Test.pm b/FS-Test/lib/FS/Test.pm index 445fdb62c..aedf502b5 100644 --- a/FS-Test/lib/FS/Test.pm +++ b/FS-Test/lib/FS/Test.pm @@ -124,7 +124,7 @@ sub fetch { my $uri = URI->new( $self->fsurl . '/' . $path); print $uri->path; my $response = $self->mech->get($uri); - print " - " . $response->code . "\n"; + print " - " . $self->mech->status . "\n"; next unless $response->is_success; local $CWD; @@ -147,7 +147,17 @@ sub fetch { push @CWD, $dir; } write_file($file, {binmode => ':utf8'}, $response->decoded_content); + + # Detect Mason errors and make noise about them; they're presumably + # _never_ correct. Mason errors have one convenient property: there's no + # element on the page. + if ( $self->mech->ct eq 'text/html' and !$self->mech->title ) { + print "***error***\n"; + } } } +# what we don't do in here is diff the results. +# Test::HTML::Differences from CPAN would be one way to do that. + 1; # End of FS::Test