File: multi_column_set.t

package info (click to toggle)
libdbix-class-perl 0.082841-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 5,236 kB
  • sloc: perl: 26,763; sql: 322; makefile: 10
file content (23 lines) | stat: -rw-r--r-- 454 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use strict;
use warnings;
use Test::More;
use lib 't/cdbi/testlib';

{
    package Thing;

    use base 'DBIC::Test::SQLite';

    Thing->columns(TEMP => qw[foo bar baz]);
    Thing->columns(All  => qw[some real stuff]);
}

my $thing = Thing->construct({ foo => 23, some => 42, baz => 99 });
$thing->set( foo => "wibble", some => "woosh" );
is $thing->foo, "wibble";
is $thing->some, "woosh";
is $thing->baz, 99;

$thing->discard_changes;

done_testing;