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:
Bradley M. Kuhn 2015-12-20 13:50:06 -08:00
parent 3afe947cdd
commit 84f81b4dd3

View file

@ -5,7 +5,7 @@
use strict;
use warnings;
use Test::More tests => 139;
use Test::More tests => 141;
use Test::Exception;
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.");
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
=cut