Commit | Line | Data |
2c0c56b7 |
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} |
c93ddd59 |
13 | ? ( tests => 2 ) |
2c0c56b7 |
14 | : ( skip_all => 'Set $ENV{DATA_DUMPER_TEST} to run this test' ); |
15 | } |
16 | |
17 | |
18 | use_ok('DBICTest'); |
2c0c56b7 |
19 | |
a47e1233 |
20 | my $schema = DBICTest->init_schema(); |
c93ddd59 |
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 | }); |
2c0c56b7 |
27 | |
28 | Dumper($rs); |
29 | |
c93ddd59 |
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 | }); |
2c0c56b7 |
36 | |
c93ddd59 |
37 | cmp_ok( $rs->count(), '==', 1, "Single record in after death with dumper"); |
2c0c56b7 |
38 | |
39 | 1; |