Temporary fixes for 5.13.x $@ handling
[dbsrgits/DBIx-Class.git] / t / storage / dbic_pretty.t
CommitLineData
b6cd6478 1use strict;
2use warnings;
3use lib qw(t/lib);
4use DBICTest;
5use Test::More;
6
7BEGIN { delete @ENV{qw(DBIC_TRACE_PROFILE)} }
8
9{
10 my $schema = DBICTest->init_schema;
11
12 isa_ok($schema->storage->debugobj, 'DBIx::Class::Storage::Statistics');
13}
14
15{
16 local $ENV{DBIC_TRACE_PROFILE} = 'console';
17
18 my $schema = DBICTest->init_schema;
19
20 isa_ok($schema->storage->debugobj, 'DBIx::Class::Storage::Debug::PrettyPrint');;
21 is($schema->storage->debugobj->_sqlat->indent_string, ' ', 'indent string set correctly from console profile');
22}
23
24{
25 local $ENV{DBIC_TRACE_PROFILE} = './t/lib/awesome.json';
26
27 my $schema = DBICTest->init_schema;
28
29 isa_ok($schema->storage->debugobj, 'DBIx::Class::Storage::Debug::PrettyPrint');;
30 is($schema->storage->debugobj->_sqlat->indent_string, 'frioux', 'indent string set correctly from file-based profile');
31}
32
33done_testing;