X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fmulti_create%2Fmultilev_single_PKeqFK.t;h=ef5c9a88a0f2ebd6c6c9e5014350b134196a36f3;hb=1b5ddf236a7911b6686be06602ffd657372523c2;hp=a730b2b64e8a09a93d82806b481141a32941142e;hpb=83896879877a43c1d63f6ffda0298b7efff0a66e;p=dbsrgits%2FDBIx-Class.git diff --git a/t/multi_create/multilev_single_PKeqFK.t b/t/multi_create/multilev_single_PKeqFK.t index a730b2b..ef5c9a8 100644 --- a/t/multi_create/multilev_single_PKeqFK.t +++ b/t/multi_create/multilev_single_PKeqFK.t @@ -8,8 +8,6 @@ use DBICTest; sub mc_diag { diag (@_) if $ENV{DBIC_MULTICREATE_DEBUG} }; -plan tests => 30; - my $schema = DBICTest->init_schema(); mc_diag (<<'DG'); @@ -102,43 +100,4 @@ for my $type (qw/has_one might_have/) { }, "multilevel $type with a PK == FK in the $type/has_many table ok"); } - -mc_diag (<<'DG'); -* Try a diamond multicreate - -Artist -> has_many -> Artwork_to_Artist -> belongs_to - / - belongs_to <- CD <- belongs_to <- Artwork <-/ - \ - \-> Artist2 - -DG - -lives_ok (sub { - $schema->resultset ('Artist')->create ({ - name => 'The wooled wolf', - artwork_to_artist => [{ - artwork => { - cd => { - title => 'Wool explosive', - year => 1999, - artist => { name => 'The black exploding sheep' }, - } - } - }], - }); - - my $art2 = $schema->resultset ('Artist')->find ({ name => 'The black exploding sheep' }); - ok ($art2, 'Second artist exists'); - - my $cd = $art2->cds->single; - is ($cd->title, 'Wool explosive', 'correctly created CD'); - - is_deeply ( - [ $cd->artwork->artists->get_column ('name')->all ], - [ 'The wooled wolf' ], - 'Artist correctly attached to artwork', - ); - -}, 'Diamond chain creation ok'); - +done_testing;