File: 09app_configfile.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 (37 lines) | stat: -rw-r--r-- 1,034 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
30
31
32
33
34
35
36
37
use strict;
use warnings;
use Test::More tests => 9;
use App::Bot::BasicBot::Pluggable;

our @ARGV = (
    qw(
      --configfile t/configfiles/bot-basicbot-pluggable.yaml
      )
);

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

is( $app->server,   'irc.example.com', 'setting server via configfile' );
is( $app->loglevel, 'fatal',           'setting loglevel via configfile' );
is( $app->port,     6668,              'setting port via configfile' );
is( $app->nick,     'botbot',          'setting basicbot via configfile' );
is( $app->charset,  'ascii',           'setting charset via configfile' );
isa_ok(
    $app->store,
    'Bot::BasicBot::Pluggable::Store::Memory',
    'store via configfile'
);

is_deeply(
    $app->module,
    [ 'Loader', 'Karma', 'Auth' ],
    'setting modules via configfile and implcit loading of modules via settings'
);

is_deeply(
    $app->channel,
    [ '#baz', '#quux' ],
    'setting channel via configfile'
);

isa_ok( $app->bot(), 'Bot::BasicBot::Pluggable', 'checking bot' );