Institute a central "load this first in testing" package
[dbsrgits/DBIx-Class.git] / t / cdbi / multi_column_set.t
1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2 use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
3
4 use strict;
5 use warnings;
6
7 use Test::More;
8 use lib 't/cdbi/testlib';
9
10 {
11     package Thing;
12
13     use base 'DBIC::Test::SQLite';
14
15     Thing->columns(TEMP => qw[foo bar baz]);
16     Thing->columns(All  => qw[some real stuff]);
17 }
18
19 my $thing = Thing->construct({ foo => 23, some => 42, baz => 99 });
20 $thing->set( foo => "wibble", some => "woosh" );
21 is $thing->foo, "wibble";
22 is $thing->some, "woosh";
23 is $thing->baz, 99;
24
25 $thing->discard_changes;
26
27 done_testing;