Streamline test
[dbsrgits/DBIx-Class.git] / t / 26dumper.t
CommitLineData
2c0c56b7 1use strict;
2use Test::More;
3use IO::File;
4
5use Data::Dumper;
6$Data::Dumper::Sortkeys = 1;
7
8use lib qw(t/lib);
9
10BEGIN {
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
18use_ok('DBICTest');
2c0c56b7 19
a47e1233 20my $schema = DBICTest->init_schema();
c93ddd59 21my $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
28Dumper($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 37cmp_ok( $rs->count(), '==', 1, "Single record in after death with dumper");
2c0c56b7 38
391;