File: 07app_defaults.t

package info (click to toggle)
libbot-basicbot-pluggable-perl 1.30%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 516 kB
  • sloc: perl: 3,153; makefile: 17
file content (29 lines) | stat: -rw-r--r-- 1,169 bytes parent folder | download | duplicates (5)
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
28
29
use strict;
use warnings;
use Test::More tests => 11;
use App::Bot::BasicBot::Pluggable;

## Testing defaults

# We need to specify configfile here explicitly in case the user
# has already written a configuration file that would be found by
# Config::Find, unlikely but oh my...
our @ARGV = ( '--configfile', 't/configfiles/empty.yaml' );

my $app = App::Bot::BasicBot::Pluggable->new_with_options();

is( $app->server,   'localhost', 'checking default for server' );
is( $app->port,     6667,        'checking default for port' );
is( $app->nick,     'basicbot',  'checking default for basicbot' );
is( $app->charset,  'utf8',      'checking default for charset' );
is( $app->loglevel, 'warn',      'checking default for loglevel' );
ok( !$app->list_modules, 'checking default for list_modules' );
ok( !$app->list_stores,  'checking default for list_stores' );
is_deeply( $app->settings, {}, 'checking default for settings' );
is_deeply( $app->module, [ 'Auth', 'Loader' ], 'checking default for modules' );
is_deeply( $app->channel, [], 'checking default for channel' );
isa_ok(
    $app->store,
    'Bot::BasicBot::Pluggable::Store::Memory',
    'default store'
);