Test that ->new() on a ResultSet object returns a Row
[dbsrgits/DBIx-Class.git] / t / prefetch / bugs.t
CommitLineData
571df676 1use warnings;
2use strict;
3
4use Test::More;
5
277b225f 6use lib qw(t/lib);
7use DBICTest;
571df676 8
277b225f 9my $schema = DBICTest->init_schema(
10 no_populate => 1,
571df676 11);
12
277b225f 13$schema->resultset('CD')->create({
14 cdid => 0,
15 artist => {
16 artistid => 0,
17 name => 0,
18 rank => 0,
19 charfield => 0,
20 },
21 title => 0,
22 year => 0,
23 genreid => 0,
24 single_track => 0,
25});
26
27ok( $schema->resultset('CD')->search( {}, { prefetch => 'artist' })->first->artist, 'artist loads even if all columns are 0');
28
29done_testing;