/[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 65 by dpavlin, Wed Jun 22 16:42:06 2005 UTC revision 66 by dpavlin, Fri Jul 8 11:46:35 2005 UTC
# Line 3  Line 3 
3  use strict;  use strict;
4  use blib;  use blib;
5    
6  use Test::More tests => 76;  use Test::More tests => 77;
7    
8  BEGIN { use_ok('Nos') };  BEGIN { use_ok('Nos') };
9    
10  ok(my $nos = new Nos('dsn' => 'dbi:Pg:dbname=notices'), "new");  ok(my $nos = new Nos('dsn' => 'dbi:Pg:dbname=notices'), "new");
11    
12  ok($nos->new_list( list => 'My list', email => 'my-list@example.com'), "new_list my-list");  my $aliases = './t/aliases';
13  ok($nos->new_list( list => 'another', email => 'another@example.com'), "new_list another");  
14  ok($nos->new_list( list => 'test', email => 'test@example.com'), "new_list test");  ok(! -e $aliases or unlink $aliases, "$aliases doesn't exist");
15    
16    ok($nos->new_list( list => 'My list', email => 'my-list@example.com', aliases => $aliases), "new_list my-list");
17    ok($nos->new_list( list => 'another', email => 'another@example.com', aliases => $aliases), "new_list another");
18    ok($nos->new_list( list => 'test', email => 'test@example.com', aliases => $aliases), "new_list test");
19    
20  ok($nos->_get_list('My list'), "_get_list");  ok($nos->_get_list('My list'), "_get_list");
21  ok($nos->_get_list('another'), "_get_list");  ok($nos->_get_list('another'), "_get_list");
# Line 62  cmp_ok(scalar $nos->list_members( list = Line 66  cmp_ok(scalar $nos->list_members( list =
66    
67  # now test delete  # now test delete
68    
69  ok($nos->new_list( list => 'delete', email => 'delete@example.com'), "new_list error");  ok($nos->new_list( list => 'delete', email => 'delete@example.com', aliases => $aliases), "new_list error");
70    
71  ok($nos->add_member_to_list( list => 'delete', email => 'delete_me@example.com' ), "add test member");  ok($nos->add_member_to_list( list => 'delete', email => 'delete_me@example.com' ), "add test member");
72    

Legend:
Removed from v.65  
changed lines
  Added in v.66

  ViewVC Help
Powered by ViewVC 1.1.26