Bugzilla – Attachment 178253 Details for
Bug 26573
Limit patron attribute types to more than one patron category
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26573: (QA follow-up) Remove category_code from tests
Bug-26573-QA-follow-up-Remove-categorycode-from-te.patch (text/plain), 4.50 KB, created by
Martin Renvoize (ashimema)
on 2025-02-18 14:05:47 UTC
(
hide
)
Description:
Bug 26573: (QA follow-up) Remove category_code from tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-02-18 14:05:47 UTC
Size:
4.50 KB
patch
obsolete
>From f744eda8c8636454bbd229264c09f3ee5773d5e3 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 18 Feb 2025 12:25:00 +0000 >Subject: [PATCH] Bug 26573: (QA follow-up) Remove category_code from tests > >--- > t/db_dependent/Koha/Patron.t | 11 ++++++----- > t/db_dependent/Koha/Patron/Attribute.t | 7 +++---- > t/db_dependent/api/v1/patrons.t | 6 +++--- > 3 files changed, 12 insertions(+), 12 deletions(-) > >diff --git a/t/db_dependent/Koha/Patron.t b/t/db_dependent/Koha/Patron.t >index f1ea69f0468..69f5ff60113 100755 >--- a/t/db_dependent/Koha/Patron.t >+++ b/t/db_dependent/Koha/Patron.t >@@ -1089,28 +1089,28 @@ subtest 'extended_attributes' => sub { > my $attribute_type_1 = $builder->build_object( > { > class => 'Koha::Patron::Attribute::Types', >- value => { mandatory => 1, class => 'a', category_code => undef } >+ value => { mandatory => 1, class => 'a' } > } > ); > > my $attribute_type_2 = $builder->build_object( > { > class => 'Koha::Patron::Attribute::Types', >- value => { mandatory => 0, class => 'a', category_code => undef } >+ value => { mandatory => 0, class => 'a' } > } > ); > > my $attribute_type_3 = $builder->build_object( > { > class => 'Koha::Patron::Attribute::Types', >- value => { mandatory => 1, class => 'a', category_code => undef, opac_editable => 1 } >+ value => { mandatory => 1, class => 'a', opac_editable => 1 } > } > ); > > my $attribute_type_4 = $builder->build_object( > { > class => 'Koha::Patron::Attribute::Types', >- value => { mandatory => 0, class => 'a', category_code => undef, opac_editable => 1 } >+ value => { mandatory => 0, class => 'a', opac_editable => 1 } > } > ); > >@@ -1176,9 +1176,10 @@ subtest 'extended_attributes' => sub { > my $attribute_type_1 = $builder->build_object( > { > class => 'Koha::Patron::Attribute::Types', >- value => { mandatory => 1, class => 'a', category_code => $patron->categorycode } >+ value => { mandatory => 1, class => 'a' } > } > ); >+ $attribute_type_1->categories( [ $patron->category ] ); > > $patron->extended_attributes( [ { code => $attribute_type_1->code, attribute => 'a' } ] ); > >diff --git a/t/db_dependent/Koha/Patron/Attribute.t b/t/db_dependent/Koha/Patron/Attribute.t >index a04afc7c97f..b02da6bb8e4 100755 >--- a/t/db_dependent/Koha/Patron/Attribute.t >+++ b/t/db_dependent/Koha/Patron/Attribute.t >@@ -50,10 +50,9 @@ subtest 'store() tests' => sub { > { > class => 'Koha::Patron::Attribute::Types', > value => { >- mandatory => 0, >- repeatable => 0, >- unique_id => 0, >- category_code => undef >+ mandatory => 0, >+ repeatable => 0, >+ unique_id => 0, > } > } > ); >diff --git a/t/db_dependent/api/v1/patrons.t b/t/db_dependent/api/v1/patrons.t >index aab985fe111..c5efeb49321 100755 >--- a/t/db_dependent/api/v1/patrons.t >+++ b/t/db_dependent/api/v1/patrons.t >@@ -928,21 +928,21 @@ subtest 'update() tests' => sub { > my $attr_type_repeatable = $builder->build_object( > { > class => 'Koha::Patron::Attribute::Types', >- value => { repeatable => 1, unique_id => 0, mandatory => 0, category_code => undef } >+ value => { repeatable => 1, unique_id => 0, mandatory => 0 } > } > ); > > my $attr_type_unique = $builder->build_object( > { > class => 'Koha::Patron::Attribute::Types', >- value => { repeatable => 0, unique_id => 1, mandatory => 0, category_code => undef } >+ value => { repeatable => 0, unique_id => 1, mandatory => 0 } > } > ); > > my $attr_type_mandatory = $builder->build_object( > { > class => 'Koha::Patron::Attribute::Types', >- value => { repeatable => 0, unique_id => 0, mandatory => 1, category_code => undef } >+ value => { repeatable => 0, unique_id => 0, mandatory => 1 } > } > ); > >-- >2.48.1
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 26573
:
139823
|
143113
|
143114
|
143115
|
143116
|
144470
|
144471
|
159210
|
159211
|
171048
|
175628
|
175629
|
177565
|
177566
|
178171
|
178172
|
178252
|
178253
|
178254
|
178255
|
178270
|
178271
|
178272
|
178273
|
183322
|
183323
|
183324
|
183325