Replace all instances of ; in the rowparser loop with , ( ~15% speedup )
[dbsrgits/DBIx-Class.git] / t / cdbi / 26-mutator.t
CommitLineData
83eef562 1use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
2
d2cee1fa 3use strict;
4a233f30 4use warnings;
83eef562 5
d2cee1fa 6use Test::More;
7
50891152 8use lib 't/cdbi/testlib';
d2cee1fa 9require Film;
10
11sub Film::accessor_name_for {
6a3bf251 12 my ($class, $col) = @_;
13 return "sheep" if lc $col eq "numexplodingsheep";
14 return $col;
d2cee1fa 15}
16
17my $data = {
6a3bf251 18 Title => 'Bad Taste',
19 Director => 'Peter Jackson',
20 Rating => 'R',
d2cee1fa 21};
22
23my $bt;
24eval {
6a3bf251 25 my $data = $data;
26 $data->{sheep} = 1;
8273e845 27 ok $bt = Film->insert($data), "Modified accessor - with
d2cee1fa 28accessor";
6a3bf251 29 isa_ok $bt, "Film";
d2cee1fa 30};
31is $@, '', "No errors";
32
33eval {
6a3bf251 34 ok $bt->sheep(2), 'Modified accessor, set';
35 ok $bt->update, 'Update';
d2cee1fa 36};
37is $@, '', "No errors";
38
d9bd5195 39done_testing;