X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F69update.t;h=ea1eaae89dd907832bcb0a541eebc7a60dceb9e2;hb=fcf32d045;hp=46868760efa829347a517dff89d600dfe82bfb5e;hpb=6c299e8b164f858bccdb635df9adeffc23b2b136;p=dbsrgits%2FDBIx-Class.git diff --git a/t/69update.t b/t/69update.t index 4686876..ea1eaae 100644 --- a/t/69update.t +++ b/t/69update.t @@ -1,5 +1,5 @@ use strict; -use warnings; +use warnings; use Test::More; use lib qw(t/lib); @@ -7,11 +7,6 @@ use DBICTest; my $schema = DBICTest->init_schema(); -BEGIN { - eval "use DBD::SQLite"; - plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 6); -} - my $art = $schema->resultset("Artist")->find(1); isa_ok $art => 'DBICTest::Artist'; @@ -20,10 +15,10 @@ my $name = 'Caterwauler McCrae'; ok($art->name($name) eq $name, 'update'); -{ +{ my @changed_keys = $art->is_changed; is( scalar (@changed_keys), 0, 'field changed but same value' ); -} +} $art->discard_changes; @@ -34,3 +29,5 @@ 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'); + +done_testing;