From: Peter Rabbitson Date: Fri, 20 Feb 2009 14:12:29 +0000 (+0000) Subject: failing test pulled X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f2f4bfec642363ab55cb3aa44e155c12ef06db9a;p=dbsrgits%2FDBIx-Class-Historic.git failing test pulled --- diff --git a/t/96multi_create.t b/t/96multi_create.t index 0ef9e80..b3ec45e 100644 --- a/t/96multi_create.t +++ b/t/96multi_create.t @@ -8,7 +8,7 @@ use DBICTest; sub mc_diag { diag (@_) if $ENV{DBIC_MULTICREATE_DEBUG} }; -plan tests => 84; +plan tests => 77; my $schema = DBICTest->init_schema(); @@ -342,57 +342,6 @@ eval { }; diag $@ if $@; -mc_diag (<<'DG'); -* Test a multilevel might-have with a PK == FK in the might_have/has_many table - -CD -> might have -> Artwork - \ - \-> has_many \ - --> Artwork_to_Artist - /-> has_many / - / - Artist -DG - -eval { - my $someartist = $schema->resultset('Artist')->first; - my $cd = $schema->resultset('CD')->create ({ - artist => $someartist, - title => 'Music to code by until the cows come home', - year => 2008, - artwork => { - artwork_to_artist => [ - { artist => { name => 'cowboy joe' } }, - { artist => { name => 'billy the kid' } }, - ], - }, - }); - - isa_ok ($cd, 'DBICTest::CD', 'Main CD object created'); - is ($cd->title, 'Music to code by until the cows come home', 'Correct CD title'); - - my $art_obj = $cd->artwork; - ok ($art_obj->has_column_loaded ('cd_id'), 'PK/FK present on artwork object'); - is ($art_obj->artists->count, 2, 'Correct artwork creator count via the new object'); - is_deeply ( - [ sort $art_obj->artists->get_column ('name')->all ], - [ 'billy the kid', 'cowboy joe' ], - 'Artists named correctly when queried via object', - ); - - my $artwork = $schema->resultset('Artwork')->search ( - { 'cd.title' => 'Music to code by until the cows come home' }, - { join => 'cd' }, - )->single; - is ($artwork->artists->count, 2, 'Correct artwork creator count via a new search'); - is_deeply ( - [ sort $artwork->artists->get_column ('name')->all ], - [ 'billy the kid', 'cowboy joe' ], - 'Artists named correctly queried via a new search', - ); -}; -diag $@ if $@; - mc_diag '* Nested find_or_create'; eval { my $newartist2 = $schema->resultset('Artist')->find_or_create({