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

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

version 1.4, 2010/01/19 03:18:34 version 1.5, 2010/01/23 07:04:43
Line 1 
Line 1 
 #===============================================================================  #===============================================================================
 #  #
 #         FILE:  filters.t  #         FILE:  formats.t
 #  #
 #  DESCRIPTION:  Test Text::Todo::REST::API  #  DESCRIPTION:  Test Text::Todo::REST::API
 #  #
 #       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: formats.t,v 1.3 2010/01/18 13:47:53 andrew Exp $  #     REVISION:  $AFresh1: formats.t,v 1.4 2010/01/19 03:18:34 andrew Exp $
 #===============================================================================  #===============================================================================
   
 use strict;  use strict;
 use warnings;  use warnings;
   
 use Test::More tests => 6;  use Test::More tests => 4;
   
 my $class;  my $class;
   
 BEGIN {  BEGIN {
     $class = 'Text::Todo::REST::API';      $class = 'Text::Todo::REST::API::Representations';
     use_ok( $class, "use $class" );      use_ok( $class, "use $class" );
 }  }
   
 diag("Testing $class $Text::Todo::REST::API::VERSION");  diag("Testing $class $Text::Todo::REST::API::Representations::VERSION");
   
 my $api = new_ok( $class, [ { todo_dir => 't/lists', path_info => '/todo' } ] );  my $path_info = '/';
   
 my $result;  my $api = new_ok( $class, [] );
 ok( !eval { $result = $api->_handle_representation('load') }, 'Load method' );  
 like( $@, '/^Unable to load \[list\]/', 'Failed Load as expected' );  
 $result = undef;  
   
 ok( !eval { $result = $api->Dump() }, 'Dump method' );  ok( !defined $api->content_type, 'content_type method' );
 like( $@, '/^Unable to dump \[list\]/', 'Failed Dump as expected' );  ok( !defined $api->can_render, 'can_render method' );
 $result = undef;  

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

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