X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F88result_set_column.t;h=e1b73a3543cf044c26111e477606e3263f8d05af;hb=8a684aeaa7dd3c6bd8c7e9a1ff7e8f5704c67a6d;hp=226c20965985e81031740de5a547877337f22a62;hpb=885c3dbda2628fa3c1c979f7ddd48443bcbaf5ab;p=dbsrgits%2FDBIx-Class.git diff --git a/t/88result_set_column.t b/t/88result_set_column.t index 226c209..e1b73a3 100644 --- a/t/88result_set_column.t +++ b/t/88result_set_column.t @@ -4,9 +4,14 @@ use warnings; use Test::More; use Test::Warn; use Test::Exception; + +# MASSIVE FIXME - there is a hole in ::RSC / as_subselect_rs +# losing the order. Needs a rework/extract of the realiaser, +# and that's a whole another bag of dicks +BEGIN { $ENV{DBIC_SHUFFLE_UNORDERED_RESULTSETS} = 0 } + use lib qw(t/lib); -use DBICTest; -use DBIC::SqlMakerTest; +use DBICTest ':DiffSQL'; my $schema = DBICTest->init_schema(); @@ -41,14 +46,16 @@ is($rs_title->min, 'Caterwaulin\' Blues', "min okay for title"); cmp_ok($rs_year->sum, '==', 9996, "three artists returned"); -my $rso_year = $rs->search({}, { order_by => 'cdid' })->get_column('year'); -is($rso_year->next, 1999, "reset okay"); +{ + my $rso_year = $rs->search({}, { order_by => 'cdid' })->get_column('year'); + is($rso_year->next, 1999, "reset okay"); -is($rso_year->first, 1999, "first okay"); + is($rso_year->first, 1999, "first okay"); -warnings_exist (sub { - is($rso_year->single, 1999, "single okay"); -}, qr/Query returned more than one row/, 'single warned'); + warnings_exist (sub { + is($rso_year->single, 1999, "single okay"); + }, qr/Query returned more than one row/, 'single warned'); +} # test distinct propagation