fulfillRequest: Behavior for "refill" request
When a request is already fulfilled, fulfillRequest() should return the record that was found for the previous fulfillment.
This commit is contained in:
parent
3afe947cdd
commit
84f81b4dd3
1 changed files with 11 additions and 1 deletions
|
@ -5,7 +5,7 @@
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
use Test::More tests => 139;
|
use Test::More tests => 141;
|
||||||
use Test::Exception;
|
use Test::Exception;
|
||||||
|
|
||||||
use Scalar::Util qw(looks_like_number reftype);
|
use Scalar::Util qw(looks_like_number reftype);
|
||||||
|
@ -346,6 +346,16 @@ is($sp->getRequestType("does-not-exist"), undef,
|
||||||
"fufillRequest: requestType not created when fufillRequest fails.");
|
"fufillRequest: requestType not created when fufillRequest fails.");
|
||||||
|
|
||||||
|
|
||||||
|
my $val2;
|
||||||
|
|
||||||
|
lives_ok { $val2 = $sp->fufillRequest( { supporterId => $drapperId,
|
||||||
|
requestType => "t-shirt-small-only", who => 'peggy',
|
||||||
|
how => "left in his office." }); }
|
||||||
|
"fufillRequest: attempt to fulfill an already-fulfill request does not die ...";
|
||||||
|
|
||||||
|
is_deeply($val2, $val,
|
||||||
|
"fufillRequest: ... but, rather, returns the same values from the previous fufillRequest() call.");
|
||||||
|
|
||||||
=item getRequest
|
=item getRequest
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
Loading…
Reference in a new issue