From a4ecdd8419319b934a186dae8830c20542deb151 Mon Sep 17 00:00:00 2001 From: Zbigniew Lukasiak Date: Fri, 22 Oct 2010 14:17:50 +0200 Subject: [PATCH] test for fixed_fields --- t/lib/RunTests.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/t/lib/RunTests.pm b/t/lib/RunTests.pm index d3a4f7b..d0fce5b 100644 --- a/t/lib/RunTests.pm +++ b/t/lib/RunTests.pm @@ -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', -- 2.45.2