(travis) Temporarily allow-fail all trusty-based builds
[dbsrgits/DBIx-Class.git] / t / storage / dbic_pretty.t
CommitLineData
c0329273 1BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
cb551b07 2use DBIx::Class::Optional::Dependencies -skip_all_without => 'test_prettydebug';
3
b6cd6478 4use strict;
5use warnings;
cb551b07 6
c0329273 7
b6cd6478 8use DBICTest;
9use Test::More;
10
11BEGIN { delete @ENV{qw(DBIC_TRACE_PROFILE)} }
12
13{
14 my $schema = DBICTest->init_schema;
15
16 isa_ok($schema->storage->debugobj, 'DBIx::Class::Storage::Statistics');
17}
18
19{
20 local $ENV{DBIC_TRACE_PROFILE} = 'console';
21
22 my $schema = DBICTest->init_schema;
23
24 isa_ok($schema->storage->debugobj, 'DBIx::Class::Storage::Debug::PrettyPrint');;
25 is($schema->storage->debugobj->_sqlat->indent_string, ' ', 'indent string set correctly from console profile');
26}
27
0dd1b736 28SKIP:{
29 DBIx::Class::Optional::Dependencies->skip_without('config_file_reader' );
30
b6cd6478 31 local $ENV{DBIC_TRACE_PROFILE} = './t/lib/awesome.json';
32
33 my $schema = DBICTest->init_schema;
34
35 isa_ok($schema->storage->debugobj, 'DBIx::Class::Storage::Debug::PrettyPrint');;
36 is($schema->storage->debugobj->_sqlat->indent_string, 'frioux', 'indent string set correctly from file-based profile');
37}
38
39done_testing;