From a1113042cf441d347f1161b9ef2e8ac633e434e4 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 e908706c8b..4756075548 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 7265bc6fc4..d1c56bbb55 100755 --- a/t/db_dependent/Koha/Patron/Attribute.t +++ b/t/db_dependent/Koha/Patron/Attribute.t @@ -54,10 +54,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 dc51ba26d0..c8058419a5 100755 --- a/t/db_dependent/api/v1/patrons.t +++ b/t/db_dependent/api/v1/patrons.t @@ -929,21 +929,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.39.5