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

Annotation of todotxt/Text-Todo-REST-API/t/formats.t, Revision 1.3

1.1       andrew      1: #===============================================================================
                      2: #
                      3: #         FILE:  filters.t
                      4: #
                      5: #  DESCRIPTION:  Test Text::Todo::REST::API
                      6: #
                      7: #       AUTHOR:  Andrew Fresh (AAF), andrew@cpan.org
                      8: #      COMPANY:  Red River Communications
                      9: #      CREATED:  01/07/10 19:11
1.3     ! andrew     10: #     REVISION:  $AFresh1: formats.t,v 1.2 2010/01/17 21:53:35 andrew Exp $
1.1       andrew     11: #===============================================================================
                     12:
                     13: use strict;
                     14: use warnings;
                     15:
                     16: use Test::More tests => 6;
                     17:
                     18: my $class;
                     19: BEGIN {
                     20:     $class = 'Text::Todo::REST::API';
                     21:     use_ok( $class, "use $class" );
                     22: }
                     23:
                     24: diag("Testing $class $Text::Todo::REST::API::VERSION");
                     25:
1.3     ! andrew     26: my $api = new_ok( $class, [ { todo_dir => 't/lists', path_info => '/todo' } ] );
1.1       andrew     27:
                     28: my $result;
1.2       andrew     29: ok( !eval { $result = $api->Load() }, 'Load method' );
                     30: like( $@, '/^Unable to Load \[list\]/', 'Failed Load as expected' );
1.1       andrew     31: $result = undef;
                     32:
1.2       andrew     33: ok( !eval { $result = $api->Dump() }, 'Dump method' );
                     34: like( $@, '/^Unable to Dump \[list\]/', 'Failed Dump as expected' );
1.1       andrew     35: $result = undef;

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