From d7f94e5da18f6d0b91b3e278ae150111bcc418bc Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Mon, 16 Jan 2017 15:31:27 -0500 Subject: [PATCH] Bug 17917: Fix Jenkins for t/db_dependent/Letters.t TEST PLAN --------- 1) prove -v t/db_dependent/Letters.t -- fail 2) apply this patch 3) prove -v t/db_dependent/Letters.t -- success 4) run koha qa test tools --- t/db_dependent/Letters.t | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t index 8219e5b..8afe46c 100644 --- a/t/db_dependent/Letters.t +++ b/t/db_dependent/Letters.t @@ -61,15 +61,18 @@ $dbh->do(q|DELETE FROM message_transport_types|); my $library = $builder->build({ source => 'Branch', }); -my $patron_category = $builder->build({ source => 'Category' }); my $date = dt_from_string; -my $borrowernumber = AddMember( - firstname => 'Jane', - surname => 'Smith', - categorycode => $patron_category,, - branchcode => $library->{branchcode}, - dateofbirth => $date, -); +my $patron = $builder->build({ + source => 'Borrower', + value => { + firstname => 'Jane', + surname => 'Smith', + branchcode => $library->{branchcode}, + dateofbirth => $date, + }, +}); +my $patron_category = $patron->{categorycode}; +my $borrowernumber = $patron->{borrowernumber}; my $marc_record = MARC::Record->new; my( $biblionumber, $biblioitemnumber ) = AddBiblio( $marc_record, '' ); @@ -469,14 +472,19 @@ $dbh->do(q{INSERT INTO letter (module, code, name, title, content) VALUES ('seri my ($serials_count, @serials) = GetSerials($subscriptionid); my $serial = $serials[0]; -my $borrowernumber = AddMember( - firstname => 'John', - surname => 'Smith', - categorycode => $patron_category, - branchcode => $library->{branchcode}, - dateofbirth => $date, - email => 'john.smith@test.de', -); +my $patron = $builder->build({ + source => 'Borrower', + value => { + firstname => 'John', + surname => 'Smith', + categorycode => $patron_category, + branchcode => $library->{branchcode}, + dateofbirth => $date, + email => 'john.smith@test.de', + }, +}); +my $borrowernumber = $patron->{borrowernumber}; + my $alert_id = C4::Letters::addalert($borrowernumber, 'issue', $subscriptionid); -- 2.1.4