X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F69update.t;h=46868760efa829347a517dff89d600dfe82bfb5e;hb=ce35224fef0822f6b05f7883ca955eb830a307a5;hp=3372b4fe8aa160de81ef0d281b014b99df5d8e8d;hpb=a47e123334d8bcea0d34dc9ea09738d6f3b1fd49;p=dbsrgits%2FDBIx-Class.git diff --git a/t/69update.t b/t/69update.t index 3372b4f..4686876 100644 --- a/t/69update.t +++ b/t/69update.t @@ -9,7 +9,7 @@ my $schema = DBICTest->init_schema(); BEGIN { eval "use DBD::SQLite"; - plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 3); + plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 6); } my $art = $schema->resultset("Artist")->find(1); @@ -27,3 +27,10 @@ ok($art->name($name) eq $name, 'update'); $art->discard_changes; +ok($art->update({ artistid => 100 }), 'update allows pk mutation'); + +is($art->artistid, 100, 'pk mutation applied'); + +my $art_100 = $schema->resultset("Artist")->find(100); +$art_100->artistid(101); +ok($art_100->update(), 'update allows pk mutation via column accessor');