Commit | Line | Data |
---|---|---|
34b6b86f | 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; |