Since .generated_pod is no longer shipped in-dist, move it to maint/
[dbsrgits/DBIx-Class-Historic.git] / t / relationship / unresolvable.t
1 use strict;
2 use warnings;
3
4 use Test::More;
5 use Test::Exception;
6
7 use lib qw(t/lib);
8 use DBICTest;
9
10 my $schema = DBICTest->init_schema();
11
12 my $cd = $schema->resultset('CD')->search ({}, { columns => ['year'], rows => 1 })->single;
13
14
15 throws_ok (
16   sub { $cd->tracks },
17   qr/Unable to resolve relationship .+ column .+ not loaded from storage/,
18   'Correct exception on nonresolvable object-based condition'
19 );
20
21 done_testing;