Explicitly normalize results of relationship resolution
[dbsrgits/DBIx-Class.git] / t / relationship / resolve_relationship_condition.t
CommitLineData
c0329273 1BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2
8169206c 3use strict;
4use warnings;
5
6use Test::More;
7use Test::Exception;
8
c0329273 9
8169206c 10use DBICTest;
11
12my $schema = DBICTest->init_schema();
13
14for (
15 { year => [1,2] },
16 { year => ['-and',1,2] },
17 { -or => [ year => 1, year => 2 ] },
18 { -and => [ year => 1, year => 2 ] },
19) {
20 throws_ok {
21 $schema->source('Track')->_resolve_relationship_condition(
22 rel_name => 'cd_cref_cond',
23 self_alias => 'me',
24 foreign_alias => 'cd',
25 foreign_values => $_
26 );
27 } qr/
28 \Qis not a column on related source 'CD'\E
29 |
30 \QValue supplied for '...{foreign_values}{year}' is not a direct equivalence expression\E
31 /x;
32}
33
34done_testing;