add simple test of config("me")
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@848 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
16e577c798
commit
6a027f4839
22
t/config.t
Normal file
22
t/config.t
Normal file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/perl -w
|
||||
use Test::More qw(no_plan);
|
||||
use File::Path;
|
||||
use strict;
|
||||
use lib 't';
|
||||
use_ok('Test::Qpsmtpd');
|
||||
|
||||
BEGIN { # need this to happen before anything else
|
||||
my $cwd = `pwd`;
|
||||
chomp($cwd);
|
||||
open my $me_config, '>', "./config.sample/me";
|
||||
print $me_config "some.host.example.org";
|
||||
close $me_config;
|
||||
}
|
||||
|
||||
ok(my ($smtpd, $conn) = Test::Qpsmtpd->new_conn(), "get new connection");
|
||||
|
||||
is($smtpd->config('me'), 'some.host.example.org', 'config("me")');
|
||||
|
||||
unlink "./config.sample/me";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user