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();
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