Make sure DBICTest is always loaded first (purely bookkeep)
[dbsrgits/DBIx-Class.git] / t / 26dumper.t
CommitLineData
2c0c56b7 1use strict;
4a233f30 2use warnings;
2c0c56b7 3use Test::More;
2c0c56b7 4
5use Data::Dumper;
6$Data::Dumper::Sortkeys = 1;
7
8use lib qw(t/lib);
2c0c56b7 9use_ok('DBICTest');
2c0c56b7 10
a47e1233 11my $schema = DBICTest->init_schema();
c93ddd59 12my $rs = $schema->resultset('CD')->search({
13 'artist.name' => 'We Are Goth',
14 'liner_notes.notes' => 'Kill Yourself!',
15}, {
16 join => [ qw/artist liner_notes/ ],
17});
2c0c56b7 18
19Dumper($rs);
20
c93ddd59 21$rs = $schema->resultset('CD')->search({
22 'artist.name' => 'We Are Goth',
23 'liner_notes.notes' => 'Kill Yourself!',
24}, {
25 join => [ qw/artist liner_notes/ ],
26});
2c0c56b7 27
c93ddd59 28cmp_ok( $rs->count(), '==', 1, "Single record in after death with dumper");
2c0c56b7 29
dc4600b2 30done_testing;