From 6a027f48394de0c8cfed22774039e81659b05ed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Thu, 14 Feb 2008 18:56:33 +0000 Subject: [PATCH] add simple test of config("me") git-svn-id: https://svn.perl.org/qpsmtpd/trunk@848 958fd67b-6ff1-0310-b445-bb7760255be9 --- t/config.t | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 t/config.t diff --git a/t/config.t b/t/config.t new file mode 100644 index 0000000..d71732c --- /dev/null +++ b/t/config.t @@ -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"; + +