From f744eda8c8636454bbd229264c09f3ee5773d5e3 Mon Sep 17 00:00:00 2001 From: Martin Renvoize 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