version 1.1, 2010/01/17 19:41:24 |
version 1.3, 2010/01/18 13:47:53 |
|
|
# 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$ |
# REVISION: $AFresh1: formats.t,v 1.2 2010/01/17 21:53:35 andrew Exp $ |
#=============================================================================== |
#=============================================================================== |
|
|
use strict; |
use strict; |
|
|
|
|
diag("Testing $class $Text::Todo::REST::API::VERSION"); |
diag("Testing $class $Text::Todo::REST::API::VERSION"); |
|
|
my $api = new_ok( $class, [ { basedir => 't', path_info => '/lists/todo' } ] ); |
my $api = new_ok( $class, [ { todo_dir => 't/lists', path_info => '/todo' } ] ); |
|
|
my $result; |
my $result; |
ok( !eval { $result = $api->Load('test') }, 'Load method' ); |
ok( !eval { $result = $api->Load() }, 'Load method' ); |
like( $@, '/^Unable to Load \[test\]/', 'Failed Load as expected' ); |
like( $@, '/^Unable to Load \[list\]/', 'Failed Load as expected' ); |
$result = undef; |
$result = undef; |
|
|
ok( !eval { $result = $api->Dump('test') }, 'Dump method' ); |
ok( !eval { $result = $api->Dump() }, 'Dump method' ); |
like( $@, '/^Unable to Dump \[test\]/', 'Failed Dump as expected' ); |
like( $@, '/^Unable to Dump \[list\]/', 'Failed Dump as expected' ); |
$result = undef; |
$result = undef; |