]> Dogcows Code - chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate/commitdiff
test for deleting a might_have
authorZbigniew Lukasiak <zby@cpan.org>
Tue, 18 May 2010 19:38:24 +0000 (21:38 +0200)
committerZbigniew Lukasiak <zby@cpan.org>
Tue, 18 May 2010 19:38:24 +0000 (21:38 +0200)
t/96multi_create.t

index 6ef75d620a1163e8af037f0fd6322b2f0046236a..9ffd13172ec83e62ac88dc060198364ee9f34370 100644 (file)
@@ -754,12 +754,16 @@ my $might_have = {
 ok my $might_have_cd_rs = $schema->resultset('CD'), 'got a good resultset';
 ok my $might_have_cd_row = $might_have_cd_rs->first, 'got cd to test';
 
+my $track = $schema->resultset ('Track')->next;
+$might_have_cd_row->single_track_row( $track );
+$might_have_cd_row->update;
+
 DBIx::Class::ResultSet::RecursiveUpdate::Functions::recursive_update(
     resultset => $might_have_cd_rs,
     updates => $might_have,
     object => $might_have_cd_row,
 );
 
-ok $schema->resultset('Track')->recursive_update($might_have), 'handled might_have';
+is( $might_have_cd_row->single_track, undef, 'Might have deleted' );
 
 1;
This page took 0.024726 seconds and 4 git commands to generate.