Fix unpredictable use of reverse_relationship_info() in the SQLT parser
[dbsrgits/DBIx-Class.git] / t / resultsource / instance_equivalence.t
1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2
3 BEGIN { $ENV{DBIC_ASSERT_NO_ERRONEOUS_METAINSTANCE_USE} = 0 }
4
5 use strict;
6 use warnings;
7 no warnings 'qw';
8
9 use Test::More;
10
11 use DBICTest;
12
13 my $schema = DBICTest->init_schema;
14 my $rsrc = $schema->source("Artist");
15
16 is( (eval($_)||die $@), $rsrc, "Same source object after $_" ) for qw(
17   $rsrc->resultset->result_source,
18   $rsrc->resultset->next->result_source,
19   $rsrc->resultset->next->result_source_instance,
20   $schema->resultset("Artist")->result_source,
21   $schema->resultset("Artist")->next->result_source,
22   $schema->resultset("Artist")->next->result_source_instance,
23 );
24
25 done_testing;