From 266802712803d59ce67286ee511ef67e65ec6df6 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 14 Apr 2017 12:46:13 +0200 Subject: [PATCH] Bug 18420: Fix HoldFulfillmentPolicy.t and Passwordrecovery.t MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We are going out of scope here, but these tests need a branch/item. Test plan: Run the adjusted tests. Signed-off-by: Marcel de Rooy Signed-off-by: Marc VĂ©ron Signed-off-by: Kyle M Hall --- t/db_dependent/Holds/HoldFulfillmentPolicy.t | 2 +- t/db_dependent/Passwordrecovery.t | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/t/db_dependent/Holds/HoldFulfillmentPolicy.t b/t/db_dependent/Holds/HoldFulfillmentPolicy.t index 66abf5a..33c0b1f 100755 --- a/t/db_dependent/Holds/HoldFulfillmentPolicy.t +++ b/t/db_dependent/Holds/HoldFulfillmentPolicy.t @@ -27,6 +27,7 @@ my $library2 = $builder->build({ my $library3 = $builder->build({ source => 'Branch', }); +my $itemtype = $builder->build({ source => 'Item' })->{itype}; my $bib_title = "Test Title"; @@ -38,7 +39,6 @@ my $borrower = $builder->build({ }); # Test hold_fulfillment_policy -my ( $itemtype ) = @{ $dbh->selectrow_arrayref("SELECT itemtype FROM itemtypes LIMIT 1") }; my $borrowernumber = $borrower->{borrowernumber}; my $library_A = $library1->{branchcode}; my $library_B = $library2->{branchcode}; diff --git a/t/db_dependent/Passwordrecovery.t b/t/db_dependent/Passwordrecovery.t index 4d4781b..893e025 100755 --- a/t/db_dependent/Passwordrecovery.t +++ b/t/db_dependent/Passwordrecovery.t @@ -51,7 +51,7 @@ my $uuid2 = "WXYZ0987"; my $uuid3 = "LMNO4561"; my $patron_category = $builder->build({ source => 'Category' }); -my $branch = $schema->resultset('Branch')->first(); # legit branch from your db +my $branch = $builder->build({ source => 'Branch' }); $schema->resultset('BorrowerPasswordRecovery')->delete_all(); @@ -64,7 +64,7 @@ $schema->resultset('Borrower')->create( userid => $userid1, email => $email1, categorycode => $patron_category->{categorycode}, - branchcode => $branch, + branchcode => $branch->{branchcode}, } ); $schema->resultset('Borrower')->create( @@ -76,7 +76,7 @@ $schema->resultset('Borrower')->create( userid => $userid2, email => $email2, categorycode => $patron_category->{categorycode}, - branchcode => $branch, + branchcode => $branch->{branchcode}, } ); $schema->resultset('Borrower')->create( @@ -88,7 +88,7 @@ $schema->resultset('Borrower')->create( userid => $userid3, email => $email3, categorycode => $patron_category->{categorycode}, - branchcode => $branch, + branchcode => $branch->{branchcode}, } ); -- 2.1.4