[BACK]Return to dudelicious.t CVS log [TXT][DIR] Up to [local] / todotxt / Text-Todo / t

Diff for /todotxt/Text-Todo/t/dudelicious.t between version 1.7 and 1.8

version 1.7, 2010/04/30 07:18:33 version 1.8, 2010/05/01 23:38:24
Line 1 
Line 1 
 #!perl  #!perl
 # $AFresh1: dudelicious.t,v 1.6 2010/04/30 01:43:14 andrew Exp $  # $AFresh1: dudelicious.t,v 1.7 2010/04/30 06:18:33 andrew Exp $
 use Test::More;    # tests => 3;  use Test::More;    # tests => 3;
   
 use strict;  use strict;
Line 53 
Line 53 
   
 SKIP: {  SKIP: {
         skip "$f does not exist", 3 if !-e $f;          skip "$f does not exist", 3 if !-e $f;
         diag("Get [$f] from [$p]");  
   
         open my $fh, '<', $f or die $f . ': ' . $!;          open my $fh, '<', $f or die $f . ': ' . $!;
         my $content = do { local $/; <$fh> };          my $content = do { local $/; <$fh> };
         close $fh;          close $fh;
   
           $t->get_ok( $p, {}, undef, "Get [$f] from [$p]" )
               ->status_is(200, 'With 200 status');
   
         if ( $f =~ /\.json$/xms ) {          if ( $f =~ /\.json$/xms ) {
             $t->get_ok($p)->status_is(200)              $t->json_content_is( Mojo::JSON->decode($content),
                 ->json_content_is( Mojo::JSON->decode($content),  
                 'Check JSON content' );                  'Check JSON content' );
         }          }
         else {          else {
             $t->get_ok($p)->status_is(200)              $t->content_is( $content, 'Check content' );
                 ->content_is( $content, 'Check content' );  
         }          }
     }      }
 }  }

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>