Bug 11634 [QA Followup] - Make unit tests pass
* Allow on shelf holds needed to be enabled * Added some error supression code for undefined string comparison Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
44cb93d77d
commit
9e07b59d5b
|
|
@ -167,6 +167,8 @@ sub addDays {
|
|||
my ( $self, $startdate, $days_duration ) = @_;
|
||||
my $base_date = $startdate->clone();
|
||||
|
||||
$self->{days_mode} ||= q{};
|
||||
|
||||
if ( $self->{days_mode} eq 'Calendar' ) {
|
||||
# use the calendar to skip all days the library is closed
|
||||
# when adding
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ sub output_pref {
|
|||
my $pref =
|
||||
defined $force_pref ? $force_pref : C4::Context->preference('dateformat');
|
||||
|
||||
my $time_format = $force_time || C4::Context->preference('TimeFormat');
|
||||
my $time_format = $force_time || C4::Context->preference('TimeFormat') || q{};
|
||||
my $time = ( $time_format eq '12hr' ) ? '%I:%M %p' : '%H:%M';
|
||||
my $date;
|
||||
if ( $pref =~ m/^iso/ ) {
|
||||
|
|
|
|||
|
|
@ -291,6 +291,7 @@ C4::Context->dbh->do("DELETE FROM accountlines");
|
|||
);
|
||||
|
||||
# Testing of feature to allow the renewal of reserved items if other items on the record can fill all needed holds
|
||||
C4::Context->set_preference('AllowOnShelfHolds', 1 );
|
||||
C4::Context->set_preference('AllowRenewalIfOtherItemsAvailable', 1 );
|
||||
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber);
|
||||
is( $renewokay, 1, 'Bug 11634 - Allow renewal of item with unfilled holds if other available items can fill those holds');
|
||||
|
|
|
|||
Loading…
Reference in New Issue