Fail causes on getRequestConfigurations.

This commit is contained in:
Bradley M. Kuhn 2015-12-13 12:50:08 -08:00
parent a3296f4b92
commit 8fd03e8e6f
2 changed files with 36 additions and 1 deletions

View file

@ -260,6 +260,32 @@ sub addRequestType($$) {
} }
###################################################################### ######################################################################
=begin getRequestConfigurations
Arguments:
=over
=item type
A string describing the request_type.
=back
Returns undef if the request_type is not found in the database. If the reuqest type is
is no request of that type.
=cut
sub getRequestConfigurations($$) {
my($self, $type) = @_;
return undef if not defined $type;
my $typeId = $self->getRequestType($type);
return undef if not defined $typeId;
}
######################################################################
=head1 Non-Public Methods =head1 Non-Public Methods
These methods are part of the internal implementation are not recommended for These methods are part of the internal implementation are not recommended for

View file

@ -5,7 +5,7 @@
use strict; use strict;
use warnings; use warnings;
use Test::More tests => 34; use Test::More tests => 36;
use Test::Exception; use Test::Exception;
use Scalar::Util qw(looks_like_number); use Scalar::Util qw(looks_like_number);
@ -161,6 +161,15 @@ lives_ok { $testSameRequestType = $sp->addRequestType('t-shirt-0'); }
is $requestTypeId, $testSameRequestType, is $requestTypeId, $testSameRequestType,
"addRequestType: lookup first of existing request type before adding."; "addRequestType: lookup first of existing request type before adding.";
=item getRequestConfigurations
=cut
is undef, $sp->getRequestConfigurations(undef), "getRequestConfigurations: undef type returns undef";
is undef, $sp->getRequestConfigurations('Hae2Ohlu'), "getRequestConfigurations: non-existent type returns undef";
=back =back
=item Internal methods used only by the module itself. =item Internal methods used only by the module itself.