From: Rafael Kitover Date: Thu, 22 Oct 2009 12:41:37 +0000 (+0000) Subject: a few extra tests can never hurt, right? :) X-Git-Tag: v0.08113~27 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8464d1a46a485fbecfb42f74b9b741cbc2534a78;p=dbsrgits%2FDBIx-Class.git a few extra tests can never hurt, right? :) --- 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;