]> Dogcows Code - chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate/commitdiff
test for fixed_fields
authorZbigniew Lukasiak <zby@cpan.org>
Fri, 22 Oct 2010 12:17:50 +0000 (14:17 +0200)
committerZbigniew Lukasiak <zby@cpan.org>
Fri, 22 Oct 2010 12:17:50 +0000 (14:17 +0200)
t/lib/RunTests.pm

index d3a4f7ba4de0f0c980d506672ab7e9bbee9a66a3..d0fce5b74b594cac099cd64bd7eca35c3517fdad 100644 (file)
@@ -9,7 +9,7 @@ use DBIx::Class::ResultSet::RecursiveUpdate;
 sub run_tests {
     my $schema = shift;
 
-    plan tests => 46;
+    plan tests => 47;
 
     my $dvd_rs  = $schema->resultset('Dvd');
     my $user_rs = $schema->resultset('User');
@@ -20,6 +20,15 @@ sub run_tests {
     my $initial_dvd_count  = $dvd_rs->count;
     my $updates;
 
+    $dvd_rs->search( { dvd_id => 1 } )->recursive_update( { 
+            owner =>  { username => 'aaa'  } 
+        },
+        [ 'dvd_id' ]
+    );
+
+    my $u = $user_rs->find( $dvd_rs->find( 1 )->owner->id );
+    is( $u->username, 'aaa', 'fixed_fields' );
+
     # try to create with a not existing rel
     $updates = {
         name        => 'Test name for nonexisting rel',
This page took 0.02569 seconds and 4 git commands to generate.