|
Lines 800-806
subtest 'is_superlibrarian() tests' => sub {
Link Here
|
| 800 |
|
800 |
|
| 801 |
subtest 'extended_attributes' => sub { |
801 |
subtest 'extended_attributes' => sub { |
| 802 |
|
802 |
|
| 803 |
plan tests => 16; |
803 |
plan tests => 17; |
| 804 |
|
804 |
|
| 805 |
my $schema = Koha::Database->new->schema; |
805 |
my $schema = Koha::Database->new->schema; |
| 806 |
$schema->storage->txn_begin; |
806 |
$schema->storage->txn_begin; |
|
Lines 1193-1200
subtest 'extended_attributes' => sub {
Link Here
|
| 1193 |
"We can set no attributes, mandatory attribute for other category not required" |
1193 |
"We can set no attributes, mandatory attribute for other category not required" |
| 1194 |
); |
1194 |
); |
| 1195 |
|
1195 |
|
|
|
1196 |
$schema->storage->txn_rollback; |
| 1196 |
}; |
1197 |
}; |
| 1197 |
|
1198 |
|
|
|
1199 |
subtest 'attribute accessor tests' => sub { |
| 1200 |
plan tests => 2; |
| 1201 |
|
| 1202 |
$schema->storage->txn_begin; |
| 1203 |
|
| 1204 |
Koha::Patron::Attribute::Types->search->delete; |
| 1205 |
|
| 1206 |
my $attribute_type_1 = $builder->build_object( |
| 1207 |
{ |
| 1208 |
class => 'Koha::Patron::Attribute::Types', |
| 1209 |
value => { code => 'smartnumber', repeatable => 0 } |
| 1210 |
} |
| 1211 |
); |
| 1212 |
|
| 1213 |
my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); |
| 1214 |
|
| 1215 |
is( $patron->smartnumber, undef, 'smartnumber accessor returns undef when not set' ); |
| 1216 |
|
| 1217 |
$patron->extended_attributes( [ { code => 'smartnumber', attribute => 'SM1234' } ] ); |
| 1218 |
|
| 1219 |
is( $patron->smartnumber, 'SM1234', 'smartnumber accessor returns value when set' ); |
| 1220 |
|
| 1221 |
$schema->storage->txn_rollback; |
| 1222 |
}; |
| 1198 |
}; |
1223 |
}; |
| 1199 |
|
1224 |
|
| 1200 |
subtest 'can_log_into() tests' => sub { |
1225 |
subtest 'can_log_into() tests' => sub { |
| 1201 |
- |
|
|