From 92aef7bb950b28ebedf1c412b5276fbbc0df1a8b Mon Sep 17 00:00:00 2001
From: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Date: Wed, 5 Mar 2025 10:36:00 +0000
Subject: [PATCH] Bug 37901: Preparation: Update tests
---
t/db_dependent/Koha/Pseudonymization.t | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/t/db_dependent/Koha/Pseudonymization.t b/t/db_dependent/Koha/Pseudonymization.t
index 3f73c778f4f..e21bbddc1bd 100755
--- a/t/db_dependent/Koha/Pseudonymization.t
+++ b/t/db_dependent/Koha/Pseudonymization.t
@@ -146,7 +146,7 @@ subtest 'Koha::Anonymized::Transactions tests' => sub {
$schema->storage->txn_rollback;
};
-subtest 'PseudonymizedBorrowerAttributes tests' => sub {
+subtest 'PseudonymizedMetadataValues tests' => sub {
plan tests => 5;
@@ -225,21 +225,21 @@ subtest 'PseudonymizedBorrowerAttributes tests' => sub {
my $p = Koha::PseudonymizedTransaction->new_from_statistic($statistic);
my $attributes =
- Koha::Database->new->schema->resultset('PseudonymizedBorrowerAttribute')
- ->search( { transaction_id => $p->id }, { order_by => 'attribute' } );
+ Koha::Database->new->schema->resultset('PseudonymizedMetadataValue')
+ ->search( { transaction_id => $p->id }, { order_by => 'value' } );
is(
$attributes->count, 2,
'Only the 2 attributes that have a type with keep_for_pseudonymization set should be kept'
);
my $attribute_1 = $attributes->next;
is_deeply(
- { attribute => $attribute_1->attribute, code => $attribute_1->code->code },
+ { attribute => $attribute_1->value, code => $attribute_1->key },
$attribute_values->[0],
'Attribute 1 should be retrieved correctly'
);
my $attribute_2 = $attributes->next;
is_deeply(
- { attribute => $attribute_2->attribute, code => $attribute_2->code->code },
+ { attribute => $attribute_2->value, code => $attribute_2->key },
$attribute_values->[2],
'Attribute 2 should be retrieved correctly'
);
@@ -260,7 +260,7 @@ subtest 'PseudonymizedBorrowerAttributes tests' => sub {
my $next_p = Koha::PseudonymizedTransaction->new_from_statistic($second_statistic);
my $next_attributes =
- Koha::Database->new->schema->resultset('PseudonymizedBorrowerAttribute')
+ Koha::Database->new->schema->resultset('PseudonymizedMetadataValue')
->search( { transaction_id => $next_p->id }, { order_by => 'attribute' } );
is(
--
2.39.5