=================================================================== RCS file: /cvs/todotxt/Text-Todo-REST-API/t/formats.t,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- todotxt/Text-Todo-REST-API/t/formats.t 2010/01/19 03:18:34 1.4 +++ todotxt/Text-Todo-REST-API/t/formats.t 2010/01/23 07:04:43 1.5 @@ -1,35 +1,32 @@ #=============================================================================== # -# FILE: filters.t +# FILE: formats.t # # DESCRIPTION: Test Text::Todo::REST::API # # AUTHOR: Andrew Fresh (AAF), andrew@cpan.org # COMPANY: Red River Communications # 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 warnings; -use Test::More tests => 6; +use Test::More tests => 4; my $class; + BEGIN { - $class = 'Text::Todo::REST::API'; + $class = 'Text::Todo::REST::API::Representations'; 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; -ok( !eval { $result = $api->_handle_representation('load') }, 'Load method' ); -like( $@, '/^Unable to load \[list\]/', 'Failed Load as expected' ); -$result = undef; +my $api = new_ok( $class, [] ); -ok( !eval { $result = $api->Dump() }, 'Dump method' ); -like( $@, '/^Unable to dump \[list\]/', 'Failed Dump as expected' ); -$result = undef; +ok( !defined $api->content_type, 'content_type method' ); +ok( !defined $api->can_render, 'can_render method' );