Lines 1089-1116
subtest 'extended_attributes' => sub {
Link Here
|
1089 |
my $attribute_type_1 = $builder->build_object( |
1089 |
my $attribute_type_1 = $builder->build_object( |
1090 |
{ |
1090 |
{ |
1091 |
class => 'Koha::Patron::Attribute::Types', |
1091 |
class => 'Koha::Patron::Attribute::Types', |
1092 |
value => { mandatory => 1, class => 'a', category_code => undef } |
1092 |
value => { mandatory => 1, class => 'a' } |
1093 |
} |
1093 |
} |
1094 |
); |
1094 |
); |
1095 |
|
1095 |
|
1096 |
my $attribute_type_2 = $builder->build_object( |
1096 |
my $attribute_type_2 = $builder->build_object( |
1097 |
{ |
1097 |
{ |
1098 |
class => 'Koha::Patron::Attribute::Types', |
1098 |
class => 'Koha::Patron::Attribute::Types', |
1099 |
value => { mandatory => 0, class => 'a', category_code => undef } |
1099 |
value => { mandatory => 0, class => 'a' } |
1100 |
} |
1100 |
} |
1101 |
); |
1101 |
); |
1102 |
|
1102 |
|
1103 |
my $attribute_type_3 = $builder->build_object( |
1103 |
my $attribute_type_3 = $builder->build_object( |
1104 |
{ |
1104 |
{ |
1105 |
class => 'Koha::Patron::Attribute::Types', |
1105 |
class => 'Koha::Patron::Attribute::Types', |
1106 |
value => { mandatory => 1, class => 'a', category_code => undef, opac_editable => 1 } |
1106 |
value => { mandatory => 1, class => 'a', opac_editable => 1 } |
1107 |
} |
1107 |
} |
1108 |
); |
1108 |
); |
1109 |
|
1109 |
|
1110 |
my $attribute_type_4 = $builder->build_object( |
1110 |
my $attribute_type_4 = $builder->build_object( |
1111 |
{ |
1111 |
{ |
1112 |
class => 'Koha::Patron::Attribute::Types', |
1112 |
class => 'Koha::Patron::Attribute::Types', |
1113 |
value => { mandatory => 0, class => 'a', category_code => undef, opac_editable => 1 } |
1113 |
value => { mandatory => 0, class => 'a', opac_editable => 1 } |
1114 |
} |
1114 |
} |
1115 |
); |
1115 |
); |
1116 |
|
1116 |
|
Lines 1176-1184
subtest 'extended_attributes' => sub {
Link Here
|
1176 |
my $attribute_type_1 = $builder->build_object( |
1176 |
my $attribute_type_1 = $builder->build_object( |
1177 |
{ |
1177 |
{ |
1178 |
class => 'Koha::Patron::Attribute::Types', |
1178 |
class => 'Koha::Patron::Attribute::Types', |
1179 |
value => { mandatory => 1, class => 'a', category_code => $patron->categorycode } |
1179 |
value => { mandatory => 1, class => 'a' } |
1180 |
} |
1180 |
} |
1181 |
); |
1181 |
); |
|
|
1182 |
$attribute_type_1->categories( [ $patron->category ] ); |
1182 |
|
1183 |
|
1183 |
$patron->extended_attributes( [ { code => $attribute_type_1->code, attribute => 'a' } ] ); |
1184 |
$patron->extended_attributes( [ { code => $attribute_type_1->code, attribute => 'a' } ] ); |
1184 |
|
1185 |
|