Lines 182-195
throws_ok { # Creating a new one, but already exists!
Link Here
|
182 |
} 'Koha::Exceptions::Patron::Attribute::UniqueIDConstraint'; |
182 |
} 'Koha::Exceptions::Patron::Attribute::UniqueIDConstraint'; |
183 |
|
183 |
|
184 |
|
184 |
|
185 |
my $borrower_numbers = C4::Members::Attributes::SearchIdMatchingAttribute('attribute1'); |
|
|
186 |
is( @$borrower_numbers, 0, 'SearchIdMatchingAttribute searchs only in attributes with staff_searchable=1' ); |
187 |
for my $attr( split(' ', $attributes->[1]->{attribute}) ) { |
188 |
$borrower_numbers = C4::Members::Attributes::SearchIdMatchingAttribute($attr); |
189 |
is( $borrower_numbers->[0], $borrowernumber, 'SearchIdMatchingAttribute returns the borrower numbers matching' ); |
190 |
} |
191 |
|
192 |
|
193 |
$patron->get_extended_attribute($attribute->{code})->delete; |
185 |
$patron->get_extended_attribute($attribute->{code})->delete; |
194 |
$borrower_attributes = $patron->extended_attributes; |
186 |
$borrower_attributes = $patron->extended_attributes; |
195 |
is( $borrower_attributes->count, 2, 'delete attribute by code' ); |
187 |
is( $borrower_attributes->count, 2, 'delete attribute by code' ); |
196 |
- |
|
|