Commit | Line | Data |
c0329273 |
1 | BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } |
2 | |
8169206c |
3 | use strict; |
4 | use warnings; |
5 | |
6 | use Test::More; |
7 | use Test::Exception; |
8 | |
c0329273 |
9 | |
8169206c |
10 | use DBICTest; |
11 | |
12 | my $schema = DBICTest->init_schema(); |
13 | |
14 | for ( |
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 | |
34 | done_testing; |