1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
10 my $schema = DBICTest->init_schema(no_populate => 1);
11 my $ars = $schema->resultset('Artist');
14 my $ref1 = \['?', [name => 'foo']];
15 my $ref2 = \['?', [name => 'bar']];
16 my $ref3 = \['?', [name => 'baz']];
18 # do it twice, make sure the args are untouched
23 $ars->create({ artistid => 666, name => $ref1, rank => $rank });
24 } 'inserted row using literal sql';
26 ok (($ars->search({ name => 'foo' })->first),
30 $ars->search({ name => { '=' => $ref1} })->update({ name => $ref2, rank => $rank });
31 } 'search/updated row using literal sql';
33 ok (($ars->search({ name => 'bar' })->first),
37 $ars->populate([{ artistid => 777, name => $ref3, rank => $rank }]);
38 } 'populated row using literal sql';
40 ok (($ars->search({ name => 'baz' })->first),
46 \['?', [name => 'foo']],
51 \['?', [name => 'bar']],
56 \['?', [name => 'baz']],