Merge 'trunk' into 'DBIx-Class-current'
[dbsrgits/DBIx-Class-Historic.git] / t / run / 09update.tl
CommitLineData
0567538f 1sub run_tests {
1edaf6fe 2my $schema = shift;
0567538f 3
4BEGIN {
5 eval "use DBD::SQLite";
6 plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 3);
7}
8
f9db5527 9my $art = $schema->resultset("Artist")->find(1);
0567538f 10
11isa_ok $art => 'DBICTest::Artist';
12
13my $name = 'Caterwauler McCrae';
14
15ok($art->name($name) eq $name, 'update');
16
17{
18 my @changed_keys = $art->is_changed;
19 is( scalar (@changed_keys), 0, 'field changed but same value' );
20}
21
22$art->discard_changes;
23
24}
25
261;