Bugzilla – Attachment 178960 Details for
Bug 37901
Add ILL pseudonymization
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37901: Preparation: Update tests
Bug-37901-Preparation-Update-tests.patch (text/plain), 2.27 KB, created by
Pedro Amorim
on 2025-03-05 12:54:08 UTC
(
hide
)
Description:
Bug 37901: Preparation: Update tests
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-03-05 12:54:08 UTC
Size:
2.27 KB
patch
obsolete
>From 51d8ed1bef3c8ed859f7035cb4d33e04fad55b1f 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 | 24 ++++++++++-------------- > 1 file changed, 10 insertions(+), 14 deletions(-) > >diff --git a/t/db_dependent/Koha/Pseudonymization.t b/t/db_dependent/Koha/Pseudonymization.t >index de0a103946d..6f16895c285 100755 >--- a/t/db_dependent/Koha/Pseudonymization.t >+++ b/t/db_dependent/Koha/Pseudonymization.t >@@ -138,9 +138,9 @@ subtest 'Koha::Anonymized::Transactions tests' => sub { > $schema->storage->txn_rollback; > }; > >-subtest 'PseudonymizedBorrowerAttributes tests' => sub { >+subtest 'PseudonymizedMetadataValues tests' => sub { > >- plan tests => 3; >+ plan tests => 5; > > $schema->storage->txn_begin; > >@@ -217,24 +217,20 @@ subtest 'PseudonymizedBorrowerAttributes tests' => sub { > > my $p = Koha::PseudonymizedTransaction->new_from_statistic($statistic)->store; > 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_values->[0], >- 'Attribute 1 should be retrieved correctly' >- ); >+ >+ is( $attribute_1->value, $attribute_values->[0]->{attribute} ); >+ is( $attribute_1->key, $attribute_values->[0]->{code} ); >+ > my $attribute_2 = $attributes->next; >- is_deeply( >- { attribute => $attribute_2->attribute, code => $attribute_2->code->code }, >- $attribute_values->[2], >- 'Attribute 2 should be retrieved correctly' >- ); >+ is( $attribute_2->value, $attribute_values->[2]->{attribute} ); >+ is( $attribute_2->key, $attribute_values->[2]->{code} ); > > $schema->storage->txn_rollback; > }; >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37901
:
178356
|
178956
|
178957
|
178958
|
178959
|
178960
|
178961
|
178962
|
178963
|
178964
|
178965
|
178966
|
178967
|
178968
|
178980
|
178981
|
178982
|
178983
|
178984
|
178985
|
178986
|
178987
|
178988
|
178989
|
178990
|
178991
|
178992
|
181008
|
181009
|
181010
|
181011
|
181012
|
181013
|
181014
|
181015
|
181016
|
181017
|
181018
|
181019
|
181020