Commit | Line | Data |
70350518 |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use Test::More; |
5 | use lib qw(t/lib); |
6 | use DBICTest; |
7 | |
a47e1233 |
8 | my $schema = DBICTest->init_schema(); |
0567538f |
9 | |
10 | BEGIN { |
11 | eval "use DBD::SQLite"; |
12 | plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 3); |
13 | } |
14 | |
f9db5527 |
15 | my $art = $schema->resultset("Artist")->find(1); |
0567538f |
16 | |
17 | isa_ok $art => 'DBICTest::Artist'; |
18 | |
19 | my $name = 'Caterwauler McCrae'; |
20 | |
21 | ok($art->name($name) eq $name, 'update'); |
22 | |
23 | { |
24 | my @changed_keys = $art->is_changed; |
25 | is( scalar (@changed_keys), 0, 'field changed but same value' ); |
26 | } |
27 | |
28 | $art->discard_changes; |
29 | |