[BACK]Return to md5.t CVS log [TXT][DIR] Up to [local] / todotxt / Text-Todo-REST-API / t / formats

Diff for /todotxt/Text-Todo-REST-API/t/formats/md5.t between version 1.1 and 1.4

version 1.1, 2010/01/17 22:56:15 version 1.4, 2010/01/19 03:18:34
Line 7 
Line 7 
 #       AUTHOR:  Andrew Fresh (AAF), andrew@cpan.org  #       AUTHOR:  Andrew Fresh (AAF), andrew@cpan.org
 #      COMPANY:  Red River Communications  #      COMPANY:  Red River Communications
 #      CREATED:  01/07/10 19:11  #      CREATED:  01/07/10 19:11
 #     REVISION:  $AFresh1: text.t,v 1.3 2010/01/17 21:53:35 andrew Exp $  #     REVISION:  $AFresh1: md5.t,v 1.3 2010/01/18 13:47:53 andrew Exp $
 #===============================================================================  #===============================================================================
   
 use strict;  use strict;
 use warnings;  use warnings;
   
 use Test::More tests => 40;  use Test::More tests => 38;
   
 my $class;  my $class;
 my $subclass;  
 my $ext;  my $ext;
   
 BEGIN {  BEGIN {
Line 24 
Line 23 
   
     $class = 'Text::Todo::REST::API';      $class = 'Text::Todo::REST::API';
     use_ok( $class, "use $class" );      use_ok( $class, "use $class" );
   
     $subclass = $class . '::' . $ext;  
     use_ok( $subclass, "use $subclass" );  
 }  }
   
 diag("Testing entry $subclass $Text::Todo::REST::API::md5::VERSION");  diag("Testing entry $class $Text::Todo::REST::API::VERSION");
   
 my $api = new_ok( $class,  my $api = new_ok( $class,
     [ { basedir => 't', path_info => '/lists/todo.' . $ext } ] );      [ { todo_dir => 't/lists', path_info => '/todo.' . $ext } ] );
 isa_ok( $api, $subclass );  
   
 my $list_should_be = [  my $list_should_be = [
     {   'text' => '(A) entry 1 @one +uno',      {   'text' => '(A) entry 1 @one +uno',
Line 67 
Line 62 
     @{$list_should_be};      @{$list_should_be};
   
 my $result;  my $result;
 ok( !eval { $result = $api->Load() }, 'Load method' );  ok( !eval { $result = $api->_handle_representation('load') }, 'Load method' );
 like( $@, '/^Unable to Load \[list\]/', 'Failed Load as expected' );  like( $@, '/^Unable to load \[list\]/', 'Failed Load as expected' );
   
 $result = undef;  $result = undef;
 ok( !( $result = $api->Dump() ), 'Dump method' );  ok( !( $result = $api->Dump() ), 'Dump method' );
Line 82 
Line 77 
 foreach my $e ( @{$list_should_be} ) {  foreach my $e ( @{$list_should_be} ) {
     my $api = new_ok(      my $api = new_ok(
         $class,          $class,
         [   {   basedir   => 't',          [   {   todo_dir => 't/lists',
                 path_info => '/lists/todo/entry/' . $e->{md5} . '.' . $ext                  path_info => '/todo/entry/' . $e->{md5} . '.' . $ext
             }              }
         ]          ]
     );      );

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

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