- Timestamp:
- 04/17/09 21:50:40 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/t/10Vote_DB.t
r214 r216 48 48 is($r->voting_count, 6, "can get voting count"); 49 49 is($r->signing_count, 4, "can get signing count"); 50 my $res = $r->results _nonull;50 my $res = $r->results; 51 51 is($res->[0]->{value}, 'ch1', "winner is ch1"); 52 52 is($res->[0]->{count}, 3, "winner has 3 voices"); … … 63 63 f => {}, 64 64 }, 65 test_count => 1 0,65 test_count => 14, 66 66 tests => sub { 67 67 my ($r) = @_; … … 76 76 is($res->[0]->{value}, 'ch1', "winner is ch1"); 77 77 is($res->[0]->{count}, 3, "winner has 3 voices"); 78 ok($res->[0]->{abs_maj}, "winner has absolute majority"); 79 ok($res->[0]->{elected}, "winner is set as elected"); 78 80 is(@$res, 4, "count of winners"); 79 81 is($res->[3]->{count}, 0, "last has 0 voices"); 82 ok(!$res->[3]->{abs_maj}, "last has not absolute majority"); 83 ok(!$res->[3]->{elected}, "last is not set as elected"); 80 84 } 81 85 },
Note: See TracChangeset
for help on using the changeset viewer.