From 80c5bec3f6779226b58cd9ecbbd7fcad6aedaba0 Mon Sep 17 00:00:00 2001
From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Date: Fri, 23 Oct 2020 11:55:44 +0100
Subject: [PATCH] Bug 23916: (follow-up) Fix unit test

This commit responds to the comment made by Katrin in comment #73. I
have removed the lines cited as causing the contraint violation. The
were added in the original iteration of the bug patches and, despite
spending time trying to get to the bottom of it, I cannot figure out
why. There are no changes in the patchset relating to Koha/Patron.pm and
removing the lines does not cause any of the tests in files that *are*
affected by this patchset to fail. I do not know why these lines were
ever added in the first place, unfortunately I did not add comments
explaining (lesson learned)!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
---
 t/db_dependent/Koha/Patrons.t | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t
index 21bfb8ccd74..c2824082e7c 100755
--- a/t/db_dependent/Koha/Patrons.t
+++ b/t/db_dependent/Koha/Patrons.t
@@ -1430,13 +1430,6 @@ subtest 'get_overdues' => sub {
             value  => { branchcode => $library->{branchcode} }
         }
     );
-    my $issuer = $builder->build(
-        {
-            source => 'Borrower',
-            value  => { branchcode => $library->{branchcode} }
-        }
-    );
-    t::lib::Mocks::mock_userenv({ number => $issuer->{borrowernumber} });
 
     t::lib::Mocks::mock_preference({ branchcode => $library->{branchcode} });
 
-- 
2.29.2