--- trunk/t/5_Node.t 2006/02/19 14:26:21 106 +++ trunk/t/5_Node.t 2006/02/19 17:01:49 107 @@ -3,7 +3,7 @@ use strict; use blib; -use Test::More tests => 101; +use Test::More tests => 106; use Test::Exception; use Data::Dumper; @@ -32,7 +32,7 @@ SKIP: { -skip "no $test1_node node in Hyper Estraier", 91, unless($node->name); +skip "no $test1_node node in Hyper Estraier", 97, unless($node->name); my @res = ( -1, 200 ); @@ -143,10 +143,24 @@ ok(! $node->uri_to_id('foobar'), 'uri_to_id without croak'); +# test users + +ok(! $node->admins, 'no admins'); +ok(! $node->guests, 'no guests'); + SKIP: { skip "no $test2_node in Hyper Estraier, skipping set_link", 2 unless (my $test2_label = $node2->label); - ok($node->set_link("http://localhost:1978/node/$test2_node", $test2_label, 42), "set_link $test2_node ($test2_label) 42"); + my $link_url = "http://localhost:1978/node/$test2_node"; + + ok($node->set_link( $link_url, $test2_label, 42), "set_link $test2_node ($test2_label) 42"); + + ok(my $links = $node->links, 'links'); + + cmp_ok($#{$links}, '==', 0, 'one link'); + + like($links->[0], qr/^$link_url/, 'link correct'); + ok($node->set_link("http://localhost:1978/node/$test2_node", $test2_label, 0), "set_link $test2_node ($test2_label) delete"); } # SKIP 2