diff options
author | franck cuny <franck@lumberjaph.net> | 2009-12-20 19:55:04 +0100 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2009-12-20 19:55:04 +0100 |
commit | 57080b2666e528223676bd20d864a4a39f6f7076 (patch) | |
tree | 8b67a68c92782d4dae7ac51bac809c4e064133d7 /t/01_basic.t | |
parent | Checking in changes prior to tagging of version 0.06. Changelog diff is: (diff) | |
download | moosex-net-api-57080b2666e528223676bd20d864a4a39f6f7076.tar.gz |
start to rewrite tests
Diffstat (limited to '')
-rw-r--r-- | t/01_basic.t | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/t/01_basic.t b/t/01_basic.t index 1ff9faf..92f5d03 100644 --- a/t/01_basic.t +++ b/t/01_basic.t @@ -20,17 +20,16 @@ ok my @methods = $obj->meta->local_api_methods(), '... get api methods'; is scalar @methods, 6, '... get 6 methods in our API'; ok my $users = $obj->users(), "... get users list"; -is $users->[0]->{user}, "bruce wayne", "... get bruce wayne"; +is $users->{status}, 1, "... get users"; -ok my $user = $obj->get_user( id => $users->[0]->{id} ), - "... fetch bruce wayne informations"; -is $user->{user}, "bruce wayne", "... get bruce wayne"; +ok my $user = $obj->get_user( id => 1 ), "... fetch user"; +is $user->{status}, 1, "... get bruce wayne"; -dies_ok { $obj->get_user( id => 12 ) } "... can't fetch unknown user"; -my $err = $@; -is $err->http_code, 404, "... get 404"; +#dies_ok { $obj->get_user( id => 12 ) } "... can't fetch unknown user"; +#my $err = $@; +#is $err->http_code, 404, "... get 404"; -my $auth_obj = FakeAPI->new(); -my $res = $auth_obj->auth_get_user(id => 1); +#my $auth_obj = FakeAPI->new(); +#my $res = $auth_obj->auth_get_user(id => 1); done_testing; |