summaryrefslogtreecommitdiff
path: root/FS-Test/lib/FS
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-08-06 19:38:41 -0700
committerMark Wells <mark@freeside.biz>2015-08-06 19:38:41 -0700
commitca36c08592ef9e91641d2a6e1d2c40c2314692d9 (patch)
tree4c7b4924e8a7b3791dd83ef09e20c73ce1703dbf /FS-Test/lib/FS
parenta2c11a9d32cdeb406f08e0a5df3ff1f70e56e9c7 (diff)
update tests
Diffstat (limited to 'FS-Test/lib/FS')
-rw-r--r--FS-Test/lib/FS/Test.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/FS-Test/lib/FS/Test.pm b/FS-Test/lib/FS/Test.pm
index 445fdb6..aedf502 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
+ # <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