Last change
on this file since 201 was
201,
checked in by nanardon, 15 years ago
|
- start test over fictives poll
|
-
Property svn:keywords set to
Id Rev
|
File size:
811 bytes
|
Line | |
---|
1 | use strict; |
---|
2 | use warnings; |
---|
3 | use Test::More; |
---|
4 | |
---|
5 | # $Id$ |
---|
6 | |
---|
7 | my $test_polls = [ |
---|
8 | # Structure: |
---|
9 | # { |
---|
10 | # poll => { var => $val } |
---|
11 | # voting => [ qw(mail) ], |
---|
12 | # ballot => { |
---|
13 | # # signing from voting list |
---|
14 | # signing => [ qw() ] # list of items |
---|
15 | # }, |
---|
16 | # } |
---|
17 | {} |
---|
18 | ]; |
---|
19 | |
---|
20 | plan tests => |
---|
21 | 3 # Fixed test |
---|
22 | + scalar(@$test_polls) * # number of tested polls scenario |
---|
23 | 1; # per poll number of tests |
---|
24 | |
---|
25 | use_ok 'Vote', 'Vote'; |
---|
26 | use_ok 'Vote::DB'; |
---|
27 | |
---|
28 | $ENV{EPOLL_NO_COMMIT} = 1; |
---|
29 | |
---|
30 | isa_ok(my $vote = Vote::DB->new(Vote->config->{db}), 'Vote::DB'); |
---|
31 | |
---|
32 | my $count = 0; |
---|
33 | foreach my $tpoll (@$test_polls) { |
---|
34 | $count++; |
---|
35 | ok(my $pollid = $vote->create_poll('test@', "Vote test $count", "password"), |
---|
36 | "can create a new poll"); |
---|
37 | |
---|
38 | $vote->rollback; |
---|
39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.