]> Dogcows Code - chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate/blobdiff - t/lib/RunTests.pm
workaround for updating records with might_have plus tests
[chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate] / t / lib / RunTests.pm
index cce65e02bda418cf5fbfcbb5dfda6e0686f19639..0c877f896d45dfa9ad1a93aee90a55c11aa06148 100644 (file)
@@ -9,7 +9,7 @@ use Test::More;
 sub run_tests{
     my $schema = shift;
 
-    plan tests => 24;
+    plan tests => 25;
     
     my $dvd_rs = $schema->resultset( 'Dvd' );
     my $user_rs = $schema->resultset( 'User' );
@@ -82,7 +82,10 @@ sub run_tests{
                 username => 'new name a',
                 name => 'new name a',
                 password => 'new password a',
-            }
+            },
+            liner_notes => {
+                notes => 'test note changed',
+            },
     };
     $dvd = $dvd_rs->recursive_update( $updates );
     
@@ -91,6 +94,8 @@ sub run_tests{
     is ( $dvd->owner->id, $another_owner->id, 'Owner updated' );
     is ( $dvd->current_borrower->name, 'new name a', 'Related record modified' );
     is ( $dvd->tags->count, 0, 'Tags deleted' );
+    is ( $dvd->liner_notes->notes, 'test note changed', 'might_have record changed' );
+
 
     # repeatable
     
This page took 0.018908 seconds and 4 git commands to generate.