X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Ftext_tradition_directory.t;h=8950148cb14e6eeb175c7a4f187ddf08ca7874e3;hb=7604424bc5cc004f536d20099d9d348aa922ce7d;hp=5ca1a3e25f6360d1595996ae7f9a1a2c03f4ab54;hpb=98a6cab2686bd3c1e7174cfa340f41e05665a642;p=scpubgit%2Fstemmatology.git diff --git a/t/text_tradition_directory.t b/t/text_tradition_directory.t index 5ca1a3e..8950148 100644 --- a/t/text_tradition_directory.t +++ b/t/text_tradition_directory.t @@ -78,6 +78,7 @@ is( ref( $nt ), 'Text::Tradition', "Made new tradition" ); like( $e->message, qr/Cannot directly delete non-Tradition object/, "Exception has correct message" ); } + $f->delete( $uuid ); ok( !$f->exists( $uuid ), "Object is deleted from DB" ); ok( !$f->exists( $sid ), "Object stemma also deleted from DB" ); @@ -88,6 +89,10 @@ is( ref( $nt ), 'Text::Tradition', "Made new tradition" ); my $g = Text::Tradition::Directory->new( 'dsn' => $dsn ); my $scope = $g->new_scope; is( scalar $g->traditionlist, 1, "Now one object in new directory index" ); + my $ntobj = $g->tradition( 'CX' ); + my @w1 = sort { $a->sigil cmp $b->sigil } $ntobj->witnesses; + my @w2 = sort{ $a->sigil cmp $b->sigil } $nt->witnesses; + is_deeply( \@w1, \@w2, "Looked up remaining tradition by name" ); } }