X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class-Tree.git;a=blobdiff_plain;f=t%2Flib%2FTreeTest.pm;h=d7228ff78ac073f1bb2de8ded08188b6f78277e3;hp=e77eea1a583cbe4857662765fa6b8aacab4b4382;hb=0179986ebd43ed29207b56279a032cd965f7ee79;hpb=eccca9212017ca7aae985dcf16c8de73234cac90 diff --git a/t/lib/TreeTest.pm b/t/lib/TreeTest.pm index e77eea1..d7228ff 100644 --- a/t/lib/TreeTest.pm +++ b/t/lib/TreeTest.pm @@ -3,12 +3,13 @@ use strict; use warnings; use Test::More; +use Test::Exception; use TreeTest::Schema; our $NODE_COUNT = 80; sub count_tests { - my $count = 13; + my $count = 14; if( TreeTest::Schema::Node->can('position_column') ){ $count ++; } @@ -27,6 +28,12 @@ sub run_tests { my $node = $nodes->create({ name=>'child' }); $node->parent( $parent_id ); } + + lives_and ( sub { + warn "BEGIN!!!!!\n\n"; + is( $nodes->find(3)->copy({name => 'special'})->name,'special','copy test'); + }, 'copy does not throw'); + ok( ($nodes->count()==81), 'correct number of nodes in random tree' ); ok( ($nodes->find(3)->children->count()==7), 'node 3 has correct number of children' ); ok( ($nodes->find(22)->children->count()==3), 'node 22 has correct number of children' );