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