=================================================================== RCS file: /cvs/todotxt/Text-Todo/t/dudelicious.t,v retrieving revision 1.7 retrieving revision 1.10 diff -u -r1.7 -r1.10 --- todotxt/Text-Todo/t/dudelicious.t 2010/04/30 07:18:33 1.7 +++ todotxt/Text-Todo/t/dudelicious.t 2010/05/05 02:32:12 1.10 @@ -1,6 +1,6 @@ #!perl -# $AFresh1: dudelicious.t,v 1.6 2010/04/30 01:43:14 andrew Exp $ -use Test::More; # tests => 3; +# $AFresh1: dudelicious.t,v 1.9 2010/05/05 01:24:20 andrew Exp $ +use Test::More tests => 75; use strict; use warnings; @@ -53,22 +53,22 @@ SKIP: { skip "$f does not exist", 3 if !-e $f; - diag("Get [$f] from [$p]"); open my $fh, '<', $f or die $f . ': ' . $!; my $content = do { local $/; <$fh> }; close $fh; + $t->get_ok( $p, {}, undef, "Get [$f] from [$p]" ) + ->status_is(200, 'With 200 status'); + if ( $f =~ /\.json$/xms ) { - $t->get_ok($p)->status_is(200) - ->json_content_is( Mojo::JSON->decode($content), + $t->json_content_is( Mojo::JSON->decode($content), 'Check JSON content' ); } else { - $t->get_ok($p)->status_is(200) - ->content_is( $content, 'Check content' ); + $t->content_like( qr/\Q$content\E/xms, 'Check content' ); } } } -done_testing(); +#done_testing();