Verify getRequest works after failed fulfill.

getRequest() should return expected values after failed fulfillRequest()
call
This commit is contained in:
Bradley M. Kuhn 2016-01-18 21:13:21 -08:00
parent ded2028069
commit 82ec41cc33

View file

@ -537,6 +537,14 @@ dies_ok { $fulfillRequestId = $sp->fulfillRequest( { donorId => $drapperId,
how => "in-person delivery" }); }
"fulfillRequest: dies if who not specified";
my $req;
lives_ok { $req = $sp->getRequest({donorId => $drapperId, requestType => "t-shirt-small-only" }); }
"getRequest: success after failed fulfillRequest attempts...";
is($req->{requestType}, "t-shirt-small-only", "getRequest: ... with correct type");
is($req->{requestDate}, $today, "getRequest: ... and correct request date.");
is($req->{fulfillDate}, undef, "getRequest: ... but no fulfillDate.");
lives_ok { $fulfillRequestId = $sp->fulfillRequest( { donorId => $drapperId,
requestType => "t-shirt-small-only", who => 'joe',
how => "in-person delivery" }); }