getRequest: unit test w/ ignoreFulfilledRequests

There was no unit test using ignoreFulfilledRequests.  This adds it.
This commit is contained in:
Bradley M. Kuhn 2016-01-18 21:29:45 -08:00
parent 02dd863c53
commit 40eb4b32c9

View file

@ -620,6 +620,11 @@ is($tt->{requestConfiguration}, 'Small', "getRequest: configuration is correct."
is($tt->{notes}, 'he probably needs a larger size but this shirt has none', is($tt->{notes}, 'he probably needs a larger size but this shirt has none',
"getRequest: notes are correct."); "getRequest: notes are correct.");
lives_ok { $tt = $sp->getRequest({donorId => $drapperId, requestType => 't-shirt-small-only', ignoreFulfilledRequests => 1}); }
"getRequest: succeeds for lookup criteria that are known to return nothing ....";
is($tt, undef, 'getRequest: .... and undef is indeed returned');
lives_ok { $tt = $sp->getRequest({donorId => $drapperId, requestTypeId => $tShirt0RequestTypeId } ); } lives_ok { $tt = $sp->getRequest({donorId => $drapperId, requestTypeId => $tShirt0RequestTypeId } ); }
"getRequest: succeeds with valid parameters, using requestTypeId."; "getRequest: succeeds with valid parameters, using requestTypeId.";