donorTotalGaveInPeriod: test badly formatted dates
It should die if the dates aren't formatted right.
This commit is contained in:
parent
003af81ce7
commit
dba498c528
1 changed files with 4 additions and 0 deletions
|
@ -841,6 +841,10 @@ dies_ok { $sp->donorTotalGaveInPeriod(donorId => undef); } "donorTotalGaveInPeri
|
|||
dies_ok { $sp->donorTotalGaveInPeriod(donorId => "str"); } "donorTotalGaveInPeriod(): dies with non-numeric donorId";
|
||||
dies_ok { $sp->donorTotalGaveInPeriod(donorId => 0); } "donorTotalGaveInPeriod(): dies with non-existent id";
|
||||
|
||||
foreach my $arg (qw/startDate endDate/) {
|
||||
dies_ok { $sp->donorTotalGaveInPeriod(donorId => $drapperId, $arg => '2015-1-5'); }
|
||||
"donorTotalGaveInPeriod(): dies with non ISO-8601 string in $arg";
|
||||
}
|
||||
my $amount;
|
||||
|
||||
lives_ok { $amount = $sp->donorTotalGaveInPeriod(donorId => $drapperId) }
|
||||
|
|
Loading…
Reference in a new issue