donorTotalGaveInPeriod: improve tests.

Actually, the amount on that one test was wrong, and I think we actually
do want to test the border cases a bit better.
This commit is contained in:
Bradley M. Kuhn 2016-01-07 13:06:40 -08:00
parent e14c0b048d
commit 003af81ce7

View file

@ -852,14 +852,14 @@ lives_ok { $amount = $sp->donorTotalGaveInPeriod(donorId => $olsonId, startDate
endDate => '2015-06-29') }
"donorTotalGaveInPeriod(): check for total with both start and end date succeeds...";
is($amount, 30.00, "donorTotalGaveInPeriod(): ...and returned value is correct. ");
is($amount, 20.00, "donorTotalGaveInPeriod(): ...and returned value is correct. ");
lives_ok { $amount = $sp->donorTotalGaveInPeriod(donorId => $harrisId, startDate => '2015-12-04'); }
"donorTotalGaveInPeriod(): check for total with just a start date succeeds...";
is($amount, 120.00, "donorTotalGaveInPeriod(): ...and returned value is correct. ");
lives_ok { $amount = $sp->donorTotalGaveInPeriod(donorId => $olsonId, endDate => '2015-02-17'); }
lives_ok { $amount = $sp->donorTotalGaveInPeriod(donorId => $olsonId, endDate => '2015-02-16'); }
"donorTotalGaveInPeriod(): check for total with just a end date succeeds...";
is($amount, 10.00, "donorTotalGaveInPeriod(): ...and returned value is correct. ");