Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 50 lines (39 sloc) 1.362 kB
634795b make catalyst branch the new trunk
autarch authored
1 use strict;
2 use warnings;
3
b131422 @autarch Make Config.t tests pass
autarch authored
4 use Test::More;
634795b make catalyst branch the new trunk
autarch authored
5
6 use Sys::Hostname ();
7 use VegGuide::Config;
8
d752bd7 @autarch perltidy all code
autarch authored
9 my $is_prod
10 = Sys::Hostname::hostname() =~ /(?:vegguide|vegcrew|satyr)/ ? 1 : 0;
634795b make catalyst branch the new trunk
autarch authored
11
12 {
d752bd7 @autarch perltidy all code
autarch authored
13 my $has_debug
14 = grep { $_ eq '-Debug' } VegGuide::Config->CatalystImports() ? 1 : 0;
634795b make catalyst branch the new trunk
autarch authored
15 my $expect = $is_prod ? 1 : 0;
16 is( $has_debug, $expect, 'check for presence of -Debug in imports' );
17 }
18
19 {
20 my %cat_config = VegGuide::Config->CatalystConfig();
b131422 @autarch Make Config.t tests pass
autarch authored
21 ok( $cat_config{session}, 'defines session config' );
22 ok( $cat_config{dbi}, 'defines dbi config' );
23 ok( $cat_config{authen_cookie}, 'defines authen cookie config' );
634795b make catalyst branch the new trunk
autarch authored
24 }
25
26 {
27 my %dbi_config = VegGuide::Config->DBConnectParams();
28 ok( $dbi_config{user}, 'defines user for dbi' );
29 }
30
31 {
32 my %mason_config = VegGuide::Config->MasonConfig();
33 ok( -d $mason_config{comp_root}, 'defines mason comp_root' );
d752bd7 @autarch perltidy all code
autarch authored
34 ok( -d $mason_config{data_dir}, 'defines mason data_dir' );
634795b make catalyst branch the new trunk
autarch authored
35 }
36
37 {
38 my $forgot_pw_secret = VegGuide::Config->ForgotPWSecret();
39 ok( defined $forgot_pw_secret, 'forgot pw secret is defined' );
40 ok( length $forgot_pw_secret, 'forgot pw secret is not an empty string' );
41 }
42
43 {
44 my $mac_secret = VegGuide::Config->MACSecret();
45 ok( defined $mac_secret, 'mac secret is defined' );
d752bd7 @autarch perltidy all code
autarch authored
46 ok( length $mac_secret, 'mac secret is not an empty string' );
634795b make catalyst branch the new trunk
autarch authored
47 }
b131422 @autarch Make Config.t tests pass
autarch authored
48
49 done_testing();
Something went wrong with that request. Please try again.