RMaint: amend bug_34000 tests as we haven't backported bug_39014
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
This commit is contained in:
parent
4c69cbe88c
commit
f3d67d9d9c
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Test::More tests => 39;
|
||||
use Test::More tests => 40;
|
||||
use Test::NoWarnings;
|
||||
use Test::Exception;
|
||||
use Test::Warn;
|
||||
|
|
@ -370,7 +370,7 @@ subtest 'is_active' => sub {
|
|||
|
||||
subtest 'add_guarantor() tests' => sub {
|
||||
|
||||
plan tests => 6;
|
||||
plan tests => 7;
|
||||
|
||||
$schema->storage->txn_begin;
|
||||
|
||||
|
|
@ -399,15 +399,16 @@ subtest 'add_guarantor() tests' => sub {
|
|||
|
||||
is( $guarantors->count, 1, 'No guarantors added' );
|
||||
|
||||
{
|
||||
local *STDERR;
|
||||
open STDERR, '>', '/dev/null';
|
||||
throws_ok
|
||||
{ $patron_1->add_guarantor({ guarantor_id => $patron_2->borrowernumber, relationship => 'father2' }); }
|
||||
warning_like(
|
||||
sub {
|
||||
throws_ok {
|
||||
$patron_1->add_guarantor( { guarantor_id => $patron_2->borrowernumber, relationship => 'father2' } );
|
||||
}
|
||||
'Koha::Exceptions::Patron::Relationship::DuplicateRelationship',
|
||||
'Exception is thrown for duplicated relationship';
|
||||
close STDERR;
|
||||
}
|
||||
'Exception is thrown for duplicated relationship';
|
||||
},
|
||||
qr{Duplicate entry.* for key '(borrower_relationships\.)?guarantor_guarantee_idx'}
|
||||
);
|
||||
|
||||
$schema->storage->txn_rollback;
|
||||
};
|
||||
|
|
@ -2969,7 +2970,8 @@ subtest 'fixup_cardnumber and autoMemberNumValue counter' => sub {
|
|||
|
||||
$schema->storage->txn_begin;
|
||||
|
||||
t::lib::Mocks::mock_preference( 'autoMemberNum', 1 );
|
||||
t::lib::Mocks::mock_preference( 'autoMemberNum', 1 );
|
||||
t::lib::Mocks::mock_preference( 'ChildNeedsGuarantor', 0 );
|
||||
|
||||
my $pref_rs = $schema->resultset('Systempreference');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue