/[notice-sender]/trunk/t/1_nos.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/t/1_nos.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 88 by dpavlin, Mon Dec 18 16:25:28 2006 UTC revision 89 by dpavlin, Mon Dec 18 18:55:43 2006 UTC
# Line 16  my $self_path = abs_path($0); Line 16  my $self_path = abs_path($0);
16  $self_path =~ s#/[^/]+$##;  $self_path =~ s#/[^/]+$##;
17  ok($self_path, "self_path: $self_path");  ok($self_path, "self_path: $self_path");
18    
19  ok(my $nos = new Nos('dsn' => 'dbi:Pg:dbname=notices'), "new");  ok(my $nos = new Nos('dsn' => 'dbi:Pg:dbname=notices', full_hostname_in_aliases => 1), "new");
20    
21  my $aliases = $self_path . '/aliases';  my $aliases = $self_path . '/aliases';
22    
# Line 90  ok(my $sent = $nos->send_queued_messages Line 90  ok(my $sent = $nos->send_queued_messages
90          sleep => 0,          sleep => 0,
91  ), 'send_queued_messages for My list');  ), 'send_queued_messages for My list');
92    
 cmp_ok( eval { scalar(Email::Send::Test->emails) }, '==', $sent, "sent $sent emails" );  
   
93  # replay to messages  # replay to messages
94    
95    my @emails = Email::Send::Test->emails;
96    
97    cmp_ok( scalar( @emails ), '==', $sent, "sent $sent emails" );
98    
99  for (my $i = 0; $i < $sent; $i++) {  for (my $i = 0; $i < $sent; $i++) {
100          ok(my $msg = Email::Send::Test->emails->[$i], "email $i");          ok(my $msg = $emails[$i], "email $i");
101          isa_ok($msg, 'Email::Simple');          isa_ok($msg, 'Email::Simple');
102          my ($from, $to);          my ($from, $to);
103          ok($from = $msg->header("From"), "found From: $from");          ok($from = $msg->header("From"), "found From: $from");

Legend:
Removed from v.88  
changed lines
  Added in v.89

  ViewVC Help
Powered by ViewVC 1.1.26