File: 03_config_paths.t

package info (click to toggle)
libdbix-class-schema-config-perl 0.001013-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 272 kB
  • sloc: perl: 2,013; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 609 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/perl
use warnings;
use strict;
use Test::More;
use base 'DBIx::Class::Schema::Config';
use File::HomeDir;

my $wanted = [ './dbic', "/etc/dbic"  ];

# add $HOME/.dbic, if $HOME exists, and as the penultimate element
my $home = File::HomeDir->my_home;
splice @{$wanted}, -1, 0, "$home/.dbic" if defined $home;

is_deeply(
    __PACKAGE__->config_paths,
    $wanted,
    "_config_paths looks sane.");

__PACKAGE__->config_paths( [ ( './this', '/var/www/that' ) ] );

is_deeply(
    __PACKAGE__->config_paths,
    [ './this', '/var/www/that'  ],
    "_config_paths can be modified.");


done_testing;