X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F100populate.t;h=9e7bc8805105c218e668d50f02abf59862e7df5d;hb=aac0bfd0de48a58cc3da1daff7614e178b4437c5;hp=ada70d9723158da4cf17b3ece1a13fa8a3769907;hpb=25be6a7ef8a802690a388ab504554a444d1e497f;p=dbsrgits%2FDBIx-Class.git diff --git a/t/100populate.t b/t/100populate.t index ada70d9..9e7bc88 100644 --- a/t/100populate.t +++ b/t/100populate.t @@ -114,9 +114,11 @@ is($link7->id, 7, 'Link 7 id'); is($link7->url, undef, 'Link 7 url'); is($link7->title, 'gtitle', 'Link 7 title'); -# test _execute_array_empty (insert_bulk with all literal sql) my $rs = $schema->resultset('Artist'); $rs->delete; + +# test _execute_array_empty (insert_bulk with all literal sql) + $rs->populate([ (+{ name => \"'DT'", @@ -133,6 +135,26 @@ is((grep { $rs->delete; +# test mixed binds with literal sql + +$rs->populate([ + (+{ + name => \"'DT'", + rank => 500, + charfield => \"'mtfnpy'", + }) x 5 +]); + +is((grep { + $_->name eq 'DT' && + $_->rank == 500 && + $_->charfield eq 'mtfnpy' +} $rs->all), 5, 'populate with all literal SQL'); + +$rs->delete; + +### + throws_ok { $rs->populate([ {