View | Details | Raw Unified | Return to bug 12532
Collapse All | Expand All

(-)a/t/db_dependent/Members.t (-4 / +14 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 50;
20
use Test::More tests => 52;
21
use Test::MockModule;
21
use Test::MockModule;
22
use Test::Exception;
22
use Test::Exception;
23
23
Lines 134-141 my $GUARANTOR_EMAIL = "Robert\@email.com"; Link Here
134
    email => $GUARANTOR_EMAIL
134
    email => $GUARANTOR_EMAIL
135
);
135
);
136
136
137
$member->{guarantorid} = Koha::Patron->new(\%data)->store->borrowernumber;
137
$addmem=Koha::Patron->new(\%data)->store->borrowernumber;
138
$patron->set($member)->store;
138
ok($addmem, "Koha::Patron->store()");
139
140
my $patron_guarantor = Koha::Patrons->find( { cardnumber => (\%data)->{'cardnumber'} } )
141
  or BAIL_OUT("Cannot read member with card (\%data)->{'cardnumber'}");
142
my $member_guarantor = $patron_guarantor->unblessed;
143
144
my %data2 = (
145
    guarantor_id => $member_guarantor->{borrowernumber},
146
    guarantee_id => $member->{borrowernumber},
147
    relationship => "father"
148
);
149
Koha::Patron::Relationship->new(\%data2)->store;
139
150
140
$member = Koha::Patrons->find( { cardnumber => $CARDNUMBER } );
151
$member = Koha::Patrons->find( { cardnumber => $CARDNUMBER } );
141
t::lib::Mocks::mock_preference( 'RedirectGuaranteeEmail', '0' );
152
t::lib::Mocks::mock_preference( 'RedirectGuaranteeEmail', '0' );
142
- 

Return to bug 12532