From: Matt S Trout Date: Wed, 5 Jan 2011 06:55:13 +0000 (+0000) Subject: make test actually test something X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4e538e489b11b9bc25f53815cfed0ddcd201c271;p=scpubgit%2FClifton.git make test actually test something --- diff --git a/t/load_config.t b/t/load_config.t index 0a66c5b..9efcf5b 100644 --- a/t/load_config.t +++ b/t/load_config.t @@ -5,6 +5,20 @@ use App::Clifton::ConfigLoader; my $cl = App::Clifton::ConfigLoader->new; -use Devel::Dwarn; +my $conf = $cl->config_from_file('t/test.conf'); -Dwarn($cl->config_from_file('t/test.conf')); +ok( + my $h = $conf->bridges->get({ name => 'example' }), + 'example bridge exists' +); + +is($h->jabber->server, 'example.org', 'property on bridge ok'); + +ok( + my $u = $conf->users->get({ name => 'mst@example.org' }), + 'example user exists' +); + +is_deeply($u->allow, [ 'example' ], 'property on user ok'); + +done_testing;