X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=blobdiff_plain;f=t%2Frelationship%2Fcore.t;fp=t%2Frelationship%2Fcore.t;h=6ebf94fa446144a117b2b3dc5a309f57e164bc4c;hp=de6afd7c727593ecca5ff18a50494c863bbda913;hb=f4dc39d649672ff4452cf827ca204a1e937bc8b7;hpb=a4e4185f3c1e0af23dc3d916f706d0e92f95de45 diff --git a/t/relationship/core.t b/t/relationship/core.t index de6afd7..6ebf94f 100644 --- a/t/relationship/core.t +++ b/t/relationship/core.t @@ -266,7 +266,11 @@ is($undir_maps->count, 1, 'found 1 undirected map for artist 2'); { my $artist_to_mangle = $schema->resultset('Artist')->find(2); - $artist_to_mangle->set_from_related( artist_undirected_maps => { id1 => 42 } ); + throws_ok { + $artist_to_mangle->set_from_related( artist_undirected_maps => { id1 => 42 } ) + } qr/\QUnable to complete value inferrence - relationship 'artist_undirected_maps' on source 'Artist' results in expression(s) instead of definitive values: ( artistid = ? OR artistid IS NULL )/, + 'Expected exception on unresovable set_from_related' + ; ok( ! $artist_to_mangle->is_changed, 'Unresolvable set_from_related did not alter object' );