Commit | Line | Data |
e60dc79f |
1 | use strict; |
2 | use Test::More; |
97d61088 |
3 | use lib 't/cdbi/testlib'; |
e60dc79f |
4 | |
5 | BEGIN { |
6 | eval "use DBIx::Class::CDBICompat;"; |
7 | plan $@ ? (skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@") |
8 | : (tests=> 3); |
9 | } |
10 | |
11 | { |
12 | package Thing; |
13 | |
97d61088 |
14 | use base 'DBIC::Test::SQLite'; |
e60dc79f |
15 | |
16 | Thing->columns(TEMP => qw[foo bar baz]); |
17 | Thing->columns(All => qw[some real stuff]); |
18 | } |
19 | |
20 | my $thing = Thing->construct({ foo => 23, some => 42, baz => 99 }); |
21 | $thing->set( foo => "wibble", some => "woosh" ); |
22 | is $thing->foo, "wibble"; |
23 | is $thing->some, "woosh"; |
24 | is $thing->baz, 99; |
25 | |
26 | $thing->discard_changes; |