--- trunk/t/5_Node.t 2006/01/06 12:40:23 49 +++ trunk/t/5_Node.t 2006/01/06 12:48:14 50 @@ -3,7 +3,7 @@ use strict; use blib; -use Test::More tests => 77; +use Test::More tests => 79; use Test::Exception; use Data::Dumper; @@ -59,18 +59,22 @@ #diag $doc->dump_draft; } -ok(my $id = $node->uri_to_id( 'data001' ), 'uri_to_id'); - -ok( $node->out_doc( $id ), "out_doc $id"); +my $id; +ok($id = $node->uri_to_id( 'data001' ), "uri_to_id = $id"); for ( 1 .. 5 ) { ok( $node->out_doc_by_uri( 'test' . $_ ), "out_doc_by_uri test$_"); } -$doc->add_attr('@uri', 'data001'); +ok($doc = $node->get_doc( $id ), 'get_doc for edit'); $doc->add_attr('foo', 'bar'); +#diag Dumper($doc); ok( $node->edit_doc( $doc ), 'edit_doc'); +ok( $node->out_doc( $id ), "out_doc $id"); + +ok( ! $node->edit_doc( $doc ), "edit removed"); + for ( 6 .. 10 ) { my $uri = 'test' . $_; ok( my $id = $node->uri_to_id( $uri ), "uri_to_id $uri");