X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F100populate.t;h=2e30a1739d52c506ea218583e1f63dd760efd4bb;hb=8464d1a46a485fbecfb42f74b9b741cbc2534a78;hp=994524e814cbe13288524a258772533340efe85c;hpb=100c5425e365fcfe9b8e8eca70a4723218fdb5ed;p=dbsrgits%2FDBIx-Class.git diff --git a/t/100populate.t b/t/100populate.t index 994524e..2e30a17 100644 --- a/t/100populate.t +++ b/t/100populate.t @@ -258,4 +258,42 @@ for ( ok ($row, "Stringification test row '$_' properly inserted"); } +$rs->delete; + +# test stringification with ->create rather than Storage::insert_bulk as well + +lives_ok { + my @dummy = $rs->populate([ + { + name => 'supplied before stringifying object', + }, + { + name => $fn, + } + ]); +} 'stringifying objects pass through'; + +# ... and vice-versa. + +lives_ok { + my @dummy = $rs->populate([ + { + name => $fn2, + }, + { + name => 'supplied after stringifying object', + }, + ]); +} 'stringifying objects pass through'; + +for ( + $fn, + $fn2, + 'supplied after stringifying object', + 'supplied before stringifying object' +) { + my $row = $rs->find ({name => $_}); + ok ($row, "Stringification test row '$_' properly inserted"); +} + done_testing;