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