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

Annotation of todotxt/Text-Todo-REST-API/t/GET/files.t, Revision 1.2

1.1       andrew      1: #===============================================================================
                      2: #
                      3: #         FILE:  GET/files.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.2     ! andrew     10: #     REVISION:  $AFresh1: files.t,v 1.1 2010/01/17 19:41:24 andrew Exp $
1.1       andrew     11: #===============================================================================
                     12:
                     13: use strict;
                     14: use warnings;
                     15:
                     16: use Test::More tests => 4;
                     17: use Data::Dumper;
                     18:
                     19: my $class;
                     20:
                     21: BEGIN {
                     22:     $class = 'Text::Todo::REST::API';
                     23:     use_ok( $class, "use $class" );
                     24: }
                     25:
                     26: diag("Testing GET files $class $Text::Todo::REST::API::VERSION");
                     27:
1.2     ! andrew     28: my $api = new_ok( $class, [ { todo_dir => 't/lists', path_info => '/todo' } ] );
1.1       andrew     29:
                     30: my @files;
                     31: ok( @files = $api->get_files, 'Get Files' );
                     32: is_deeply( \@files, [ 'todo.txt' ], 'Got correct file' );

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