From 14e5d38773027cd424d7bb3385804d06740097ad Mon Sep 17 00:00:00 2001
From: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Date: Fri, 25 Oct 2019 13:12:38 +0100
Subject: [PATCH] Bug 23579: (RM follow-up) Fix failing tests

Removing the default on changed_fields leads to the requirement for
tests to specify data to add to said field when mocking data.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
---
 t/db_dependent/Letters/TemplateToolkit.t | 2 +-
 t/db_dependent/Members.t                 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/db_dependent/Letters/TemplateToolkit.t b/t/db_dependent/Letters/TemplateToolkit.t
index 502e4299cc..f62a737eb9 100644
--- a/t/db_dependent/Letters/TemplateToolkit.t
+++ b/t/db_dependent/Letters/TemplateToolkit.t
@@ -97,7 +97,7 @@ my $serial       = Koha::Serial->new()->store();
 my $subscription = Koha::Subscription->new()->store();
 my $suggestion   = Koha::Suggestion->new()->store();
 my $checkout     = Koha::Checkout->new( { itemnumber => $item->id() } )->store();
-my $modification = Koha::Patron::Modification->new( { verification_token => "TEST" } )->store();
+my $modification = Koha::Patron::Modification->new( { verification_token => "TEST", changed_fields => 'firstname,surname' } )->store();
 
 my $prepared_letter;
 
diff --git a/t/db_dependent/Members.t b/t/db_dependent/Members.t
index dbda295dda..ff5fe994ff 100755
--- a/t/db_dependent/Members.t
+++ b/t/db_dependent/Members.t
@@ -341,7 +341,7 @@ subtest 'purgeSelfRegistration' => sub {
     my $d=360;
     C4::Members::DeleteUnverifiedOpacRegistrations($d);
     foreach(1..3) {
-        $dbh->do("INSERT INTO borrower_modifications (timestamp, borrowernumber, verification_token) VALUES ('2014-01-01 01:02:03',0,?)", undef, (scalar localtime)."_$_");
+        $dbh->do("INSERT INTO borrower_modifications (timestamp, borrowernumber, verification_token, changed_fields) VALUES ('2014-01-01 01:02:03',0,?,'firstname,surname')", undef, (scalar localtime)."_$_");
     }
     is( C4::Members::DeleteUnverifiedOpacRegistrations($d), 3, 'Test for DeleteUnverifiedOpacRegistrations' );
 
-- 
2.20.1