Institute a central "load this first in testing" package
[dbsrgits/DBIx-Class-Historic.git] / t / multi_create / multilev_single_PKeqFK.t
index ef5c9a8..301e80b 100644 (file)
@@ -1,9 +1,11 @@
+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
+
 use strict;
 use warnings;
 
 use Test::More;
 use Test::Exception;
-use lib qw(t/lib);
+
 use DBICTest;
 
 sub mc_diag { diag (@_) if $ENV{DBIC_MULTICREATE_DEBUG} };
@@ -59,7 +61,7 @@ for my $type (qw/has_one might_have/) {
   my $cd_title = "Test $type cd";
   my $artist_names = [ map { "Artist via $type $_" } (1, 2) ];
 
-  my $someartist = $artist_rs->next;
+  my $someartist = $artist_rs->search({}, { rows => 1 })->next;
 
   lives_ok (sub {
     my $cd = $schema->resultset('CD')->create ({