Verify getRequest works after failed fulfill.
getRequest() should return expected values after failed fulfillRequest() call
This commit is contained in:
parent
ded2028069
commit
82ec41cc33
1 changed files with 8 additions and 0 deletions
|
@ -537,6 +537,14 @@ dies_ok { $fulfillRequestId = $sp->fulfillRequest( { donorId => $drapperId,
|
||||||
how => "in-person delivery" }); }
|
how => "in-person delivery" }); }
|
||||||
"fulfillRequest: dies if who not specified";
|
"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,
|
lives_ok { $fulfillRequestId = $sp->fulfillRequest( { donorId => $drapperId,
|
||||||
requestType => "t-shirt-small-only", who => 'joe',
|
requestType => "t-shirt-small-only", who => 'joe',
|
||||||
how => "in-person delivery" }); }
|
how => "in-person delivery" }); }
|
||||||
|
|
Loading…
Reference in a new issue