Merge 'trunk' into 'replication_dedux'
[dbsrgits/DBIx-Class.git] / t / 26dumper.t
1 use strict;
2 use Test::More;
3 use IO::File;
4
5 use Data::Dumper;
6 $Data::Dumper::Sortkeys = 1;
7
8 use lib qw(t/lib);
9
10 BEGIN {
11     eval "use DBD::SQLite";
12     plan $ENV{DATA_DUMPER_TEST}
13         ? ( tests => 2 )
14         : ( skip_all => 'Set $ENV{DATA_DUMPER_TEST} to run this test' );
15 }
16
17
18 use_ok('DBICTest');
19
20 my $schema = DBICTest->init_schema();
21 my $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 });
27
28 Dumper($rs);
29
30 $rs = $schema->resultset('CD')->search({
31   'artist.name' => 'We Are Goth',
32   'liner_notes.notes' => 'Kill Yourself!',
33 }, {
34   join => [ qw/artist liner_notes/ ],
35 });
36
37 cmp_ok( $rs->count(), '==', 1, "Single record in after death with dumper");
38
39 1;