X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Finflate%2Fhri.t;h=0564cad366e9179acc82c641f25e10d7cf89484d;hb=c8b1011e62b44d8a35b5de0ec8e7ace99879c7af;hp=1dca9c2333162f867fcf1e047385a52b4f16dd18;hpb=fe0708a2d68b5d34b6bc6f7e70164c3e569f1dd0;p=dbsrgits%2FDBIx-Class.git diff --git a/t/inflate/hri.t b/t/inflate/hri.t index 1dca9c2..0564cad 100644 --- a/t/inflate/hri.t +++ b/t/inflate/hri.t @@ -1,9 +1,19 @@ +BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } + use strict; use warnings; use Test::More; + +use DBIx::Class::_Util 'modver_gt_or_eq_and_lt'; +use base(); +BEGIN { + plan skip_all => 'base.pm 2.20 (only present in perl 5.19.7) is known to break this test' + if modver_gt_or_eq_and_lt( 'base', '2.19_01', '2.21' ); +} + use Test::Exception; -use lib qw(t/lib); + use DBICTest; my $schema = DBICTest->init_schema(); @@ -34,13 +44,13 @@ my $schema = DBICTest->init_schema(); is ($rs->result_class, 'DBICTest::CDSubclass', 'original class unchanged'); is ($hri_rs->result_class, 'DBIx::Class::ResultClass::HashRefInflator', 'result_class accessor pre-set via attribute'); - my $datahashref1 = $hri_rs->next; is_deeply( [ sort keys %$datahashref1 ], [ sort $rs->result_source->columns ], 'returned correct columns', ); + $hri_rs->reset; $cd = $hri_rs->find ({cdid => 1}); is_deeply ( $cd, $datahashref1, 'first/find return the same thing (result_class attr propagates)');