diff options
author | Mark Wells <mark@freeside.biz> | 2015-08-06 23:15:26 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-08-06 23:15:26 -0700 |
commit | 3e2c2ad8aff1bd361ca07495b2255538c8231079 (patch) | |
tree | 9a398e455a7767372588077470685d25ef8d82b3 /FS-Test/lib | |
parent | 3d8d713877e0cdc91fd413539510b5a457f264bb (diff) |
update tests to keep in sync with v4
Diffstat (limited to 'FS-Test/lib')
-rw-r--r-- | FS-Test/lib/FS/Test.pm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/FS-Test/lib/FS/Test.pm b/FS-Test/lib/FS/Test.pm index 673b8c572..8b1523388 100644 --- a/FS-Test/lib/FS/Test.pm +++ b/FS-Test/lib/FS/Test.pm @@ -116,7 +116,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; @@ -139,7 +139,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 + # <title> 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 |