[siesta-commit] siesta/t 10plugin_listheaders.t,NONE,1.1

[prev] [thread] [next] [lurker] [Date index for 2002/10/15]

From: clampr
Subject: [siesta-commit] siesta/t 10plugin_listheaders.t,NONE,1.1
Date: 14:31 on 15 Oct 2002
Update of /cvsroot/siesta/siesta/t
In directory usw-pr-cvs1:/tmp/cvs-serv4073/t

Added Files:
	10plugin_listheaders.t 
Log Message:
coverage + perltidy nit

--- NEW FILE: 10plugin_listheaders.t ---
#!perl -w
use strict;
use Test::More tests => 5;
use Test::MockObject;

use Siesta::Message;
use Siesta::Plugin::ListHeaders;
my $plugin = Siesta::Plugin::ListHeaders->new;

my $mail = Siesta::Message->new;
my $list =
  Test::MockObject->new->mock( post_address => sub { 'foo@xxx.xxx' } )
  ->mock( id => sub { 'test' } )->mock( owner => sub { 'foo-owner@xxx.xxx' } );

$mail->list($list);

is( $mail->head->get("List-Id"), undef );
ok( !$plugin->process($mail) );
is( $mail->head->get("List-Id"), "test <foo.foo.com>\n" );
ok( !$plugin->process($mail) );
is( $mail->head->get("List-Id"), "test <foo.foo.com>\n" );




Generated at 13:57 on 01 Jul 2004 by mariachi 0.52