/[Search-Estraier]/trunk/t/5_Node.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/t/5_Node.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 93 by dpavlin, Thu Jan 26 15:29:20 2006 UTC revision 94 by dpavlin, Sat Jan 28 17:38:00 2006 UTC
# Line 126  ok($node->set_snippet_width( 100, 10, 10 Line 126  ok($node->set_snippet_width( 100, 10, 10
126  # user doesn't exist  # user doesn't exist
127  ok(! $node->set_user('foobar', 1), 'set_user');  ok(! $node->set_user('foobar', 1), 'set_user');
128    
129  ok(my $node1 = new Search::Estraier::Node( "http://localhost:1978/node/$test2_node" ), "new $test2_node");  ok(my $node2 = new Search::Estraier::Node( "http://localhost:1978/node/$test2_node" ), "new $test2_node");
130  ok($node1->set_auth('admin','admin'), "set_auth $test2_node");  ok($node2->set_auth('admin','admin'), "set_auth $test2_node");
131    
132  # croak_on_error  # croak_on_error
133    
134  ok(my $node2 = new Search::Estraier::Node( url => "http://localhost:1978/non-existant", croak_on_error => 1 ), "new non-existant");  ok($node = new Search::Estraier::Node( url => "http://localhost:1978/non-existant", croak_on_error => 1 ), "new non-existant");
135  throws_ok { $node2->name } qr/404/, 'croak on error';  throws_ok { $node->name } qr/404/, 'croak on error';
136    
137    # support for undef and 0 values
138    #ok($node = new Search::Estraier::Node( url => "http://localhost:1978/$test1_node", croak_on_error => 1 ), "new $test1_node");
139    
140  SKIP: {  SKIP: {
141          skip "no $test2_node in Hyper Estraier, skipping set_link", 2 unless (my $test1_label = $node1->label);          skip "no $test2_node in Hyper Estraier, skipping set_link", 2 unless (my $test2_label = $node2->label);
142    
143          ok($node->set_link("http://localhost:1978/node/$test2_node", $test1_label, 42), "set_link $test2_node ($test1_label) 42");          ok($node->set_link("http://localhost:1978/node/$test2_node", $test2_label, 42), "set_link $test2_node ($test2_label) 42");
144          ok($node->set_link("http://localhost:1978/node/$test2_node", $test1_label, 0), "set_link $test2_node ($test1_label) delete");          ok($node->set_link("http://localhost:1978/node/$test2_node", $test2_label, 0), "set_link $test2_node ($test2_label) delete");
145  }       # SKIP 2  }       # SKIP 2
146    
147  }       # SKIP 1  }       # SKIP 1

Legend:
Removed from v.93  
changed lines
  Added in v.94

  ViewVC Help
Powered by ViewVC 1.1.26