X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F101populate_rs.t;h=89b9f4199af5611eb0f5496b3b5ded19f27fd488;hb=c4e67d31ed6f3fb01c07451cdf69c0782bc610a2;hp=4eca3b51d31d552d638f6c42c689f526b0fbaa49;hpb=13b9e8285fc913aa88469afa8d28fd3cd33e04cc;p=dbsrgits%2FDBIx-Class.git diff --git a/t/101populate_rs.t b/t/101populate_rs.t index 4eca3b5..89b9f41 100644 --- a/t/101populate_rs.t +++ b/t/101populate_rs.t @@ -15,7 +15,7 @@ use Test::More; use lib qw(t/lib); use DBICTest; -plan tests => 134; +plan tests => 142; ## ---------------------------------------------------------------------------- @@ -601,4 +601,30 @@ VOID_CONTEXT: { ok( $cd2->title eq "VOID_Yet More Tweeny-Pop crap", "Got Expected CD Title"); } +} + +ARRAYREF_OF_ARRAYREF_STYLE: { + $art_rs->populate([ + [qw/artistid name/], + [1000, 'A Formally Unknown Singer'], + [1001, 'A singer that jumped the shark two albums ago'], + [1002, 'An actually cool singer.'], + ]); + + ok my $unknown = $art_rs->find(1000), "got Unknown"; + ok my $jumped = $art_rs->find(1001), "got Jumped"; + ok my $cool = $art_rs->find(1002), "got Cool"; + + is $unknown->name, 'A Formally Unknown Singer', 'Correct Name'; + is $jumped->name, 'A singer that jumped the shark two albums ago', 'Correct Name'; + is $cool->name, 'An actually cool singer.', 'Correct Name'; + + my ($cooler, $lamer) = $art_rs->populate([ + [qw/artistid name/], + [1003, 'Cooler'], + [1004, 'Lamer'], + ]); + + is $cooler->name, 'Cooler', 'Correct Name'; + is $lamer->name, 'Lamer', 'Correct Name'; } \ No newline at end of file