Commit | Line | Data |
c0329273 |
1 | BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } |
2 | |
70350518 |
3 | use strict; |
8273e845 |
4 | use warnings; |
70350518 |
5 | |
6 | use Test::More; |
c0329273 |
7 | |
70350518 |
8 | use DBICTest; |
9 | |
a47e1233 |
10 | my $schema = DBICTest->init_schema(); |
0567538f |
11 | |
5d1d81d6 |
12 | plan tests => 5; |
70350518 |
13 | |
c216324a |
14 | my $artist = $schema->resultset("Artist")->find(1); |
716b3d29 |
15 | ok($artist->find_related('twokeys', {cd => 1}), "find multiple pks using relationships + args"); |
5d1d81d6 |
16 | |
17 | ok($schema->resultset("FourKeys")->search({ foo => 1, bar => 2 })->find({ hello => 3, goodbye => 4 }), "search on partial key followed by a find"); |
f9db5527 |
18 | ok($schema->resultset("FourKeys")->find(1,2,3,4), "find multiple pks without hash"); |
19 | ok($schema->resultset("FourKeys")->find(5,4,3,6), "find multiple pks without hash"); |
9bbd8963 |
20 | is($schema->resultset("FourKeys")->find(1,2,3,4)->ID, 'DBICTest::FourKeys|fourkeys|bar=2|foo=1|goodbye=4|hello=3', 'unique object id ok for multiple pks'); |
1f6715ab |
21 | |