Merge 'trunk' into 'replication_dedux'
[dbsrgits/DBIx-Class.git] / t / cdbi-t / multi_column_set.t
CommitLineData
e60dc79f 1#!/usr/bin/perl -w
2
3use strict;
4use Test::More;
5
6BEGIN {
7 eval "use DBIx::Class::CDBICompat;";
8 plan $@ ? (skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@")
9 : (tests=> 3);
10}
11
12{
13 package Thing;
14
15 use base 'DBIx::Class::Test::SQLite';
16
17 Thing->columns(TEMP => qw[foo bar baz]);
18 Thing->columns(All => qw[some real stuff]);
19}
20
21my $thing = Thing->construct({ foo => 23, some => 42, baz => 99 });
22$thing->set( foo => "wibble", some => "woosh" );
23is $thing->foo, "wibble";
24is $thing->some, "woosh";
25is $thing->baz, 99;
26
27$thing->discard_changes;