@@ -, +, @@
---
.../prog/en/modules/members/tables/guarantor_search.tt | 2 +-
t/db_dependent/Reserves.t | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/guarantor_search.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/guarantor_search.tt
@@ -18,7 +18,7 @@
"dt_address":
"[% INCLUDE escape_address data=data %]",
"dt_action":
- "Select"
+ "Select"
}[% UNLESS loop.last %],[% END %]
[% END %]
]
--- a/t/db_dependent/Reserves.t
+++ a/t/db_dependent/Reserves.t
@@ -672,7 +672,7 @@ subtest '_koha_notify_reserve() tests' => sub {
};
subtest 'ReservesNeedReturns' => sub {
- plan tests => 10;
+ plan tests => 11;
my $library = $builder->build_object( { class => 'Koha::Libraries' } );
my $item_info = {
@@ -721,8 +721,10 @@ subtest 'ReservesNeedReturns' => sub {
$hold = place_item_hold( $patron, $item, $library, $priority );
is( $hold->priority, 0, 'If ReservesNeedReturns is 0 and damaged holds allowed, priority must have been set to 0' );
is( $hold->found, 'W', 'If ReservesNeedReturns is 0 and damaged holds allowed, found must have been set waiting' );
+ $hold->delete;
my $hold_1 = place_item_hold( $patron, $item, $library, $priority );
+ is( $hold_1->priority, 0, 'First hold on item is set to waiting with ReservesNeedReturns set to 0' );
$hold = place_item_hold( $patron_2, $item, $library, $priority );
is( $hold->priority, 1, 'If ReservesNeedReturns is 0 but item already on hold priority must be set to 1' );
$hold->delete;
@@ -734,7 +736,7 @@ subtest 'ReservesNeedReturns' => sub {
} });
$item->damaged(0)->store;
$hold = place_item_hold( $patron, $item, $library, $priority );
- isnt( $hold->priority, 0, 'If ReservesNeedReturns is 0 but item in transit the hold must not be set to waiting' );
+ is( $hold->priority, 1, 'If ReservesNeedReturns is 0 but item in transit the hold must not be set to waiting' );
t::lib::Mocks::mock_preference('ReservesNeedReturns', 1); # Don't affect other tests
};
--