show more ways to include literal bind values
[dbsrgits/DBIx-Class.git] / t / relationship / custom_with_null_in_cond.t
CommitLineData
18c294f4 1use strict;
2use warnings;
3
4use Test::More;
5
6use lib 't/lib';
7use DBICTest;
8
9my $schema = DBICTest->init_schema();
10
11my $artist_rs = $schema->resultset('Artist');
12
13for my $rel_rs(
14 $artist_rs->search_related_rs(
15 cds_without_genre => { artist => 1 }, { order_by => 'cdid' }
16 ),
17 $artist_rs->find(1)->search_related_rs(
18 cds_without_genre => {}, { order_by => 'cdid' }
19 ),
20) {
21
22 is_deeply(
23 $rel_rs->all_hri,
24 [
25 {
26 artist => 1,
27 cdid => 2,
28 genreid => undef,
29 single_track => undef,
30 title => "Forkful of bees",
31 year => 2001
32 },
33 {
34 artist => 1,
35 cdid => 3,
36 genreid => undef,
37 single_track => undef,
38 title => "Caterwaulin' Blues",
39 year => 1997
40 },
41 ]
42 );
43}
44
45done_testing;