Bug 14570: (QA follow-up) Fix tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Agustin Moyano <agustinmoyano@theke.io> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
b4b95b9726
commit
3bff8a17ea
2 changed files with 6 additions and 0 deletions
|
@ -87,6 +87,9 @@ subtest 'library' => sub {
|
|||
|
||||
subtest 'guarantees' => sub {
|
||||
plan tests => 13;
|
||||
|
||||
t::lib::Mocks::mock_preference( 'borrowerRelationship', 'test|test2' );
|
||||
|
||||
my $guarantees = $new_patron_1->guarantee_relationships;
|
||||
is( ref($guarantees), 'Koha::Patron::Relationships', 'Koha::Patron->guarantees should return a Koha::Patrons result set in a scalar context' );
|
||||
is( $guarantees->count, 0, 'new_patron_1 should have 0 guarantee relationships' );
|
||||
|
|
|
@ -265,6 +265,9 @@ $patstodel = GetBorrowersToExpunge( {not_borrowed_since => '2016-01-02', patron_
|
|||
ok( scalar(@$patstodel) == 1 && $patstodel->[0]->{'borrowernumber'} eq $bor2inlist,'Staff patron not deleted by last issue date');
|
||||
|
||||
Koha::Patrons->find($bor1inlist)->set({ categorycode => 'CIVILIAN' })->store;
|
||||
|
||||
t::lib::Mocks::mock_preference( 'borrowerRelationship', 'test' );
|
||||
|
||||
my $relationship = Koha::Patron::Relationship->new( { guarantor_id => $bor1inlist, guarantee_id => $guarantee->{borrowernumber}, relationship => 'test' } )->store();
|
||||
|
||||
$patstodel = GetBorrowersToExpunge( {patron_list_id => $list1->patron_list_id()} );
|
||||
|
|
Loading…
Reference in a new issue