Institute a central "load this first in testing" package
[dbsrgits/DBIx-Class.git] / xt / extra / diagnostics / unresolvable_relationship.t
CommitLineData
c0329273 1BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2
34b6b86f 3use strict;
4use warnings;
5
6use Test::More;
7use Test::Exception;
8
c0329273 9
34b6b86f 10use DBICTest;
11
12my $schema = DBICTest->init_schema();
13
14my $cd = $schema->resultset('CD')->search ({}, { columns => ['year'], rows => 1 })->single;
15
16
17throws_ok (
18 sub { $cd->tracks },
19 qr/Unable to resolve relationship .+ column .+ not loaded from storage/,
20 'Correct exception on nonresolvable object-based condition'
21);
22
23done_testing;