|
Lines 19-25
Link Here
|
| 19 |
|
19 |
|
| 20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
| 21 |
|
21 |
|
| 22 |
use Test::More tests => 7; |
22 |
use Test::More tests => 8; |
| 23 |
|
23 |
|
| 24 |
use Koha::Database; |
24 |
use Koha::Database; |
| 25 |
use Koha::Patron::Category; |
25 |
use Koha::Patron::Category; |
|
Lines 57-62
is( $retrieved_category_2->checkprevcheckout, 'inherit', 'Koha::Patron::Category
Link Here
|
| 57 |
$retrieved_category_1->delete; |
57 |
$retrieved_category_1->delete; |
| 58 |
is( Koha::Patron::Categories->search->count, $nb_of_categories + 1, 'Delete should have deleted the patron category' ); |
58 |
is( Koha::Patron::Categories->search->count, $nb_of_categories + 1, 'Delete should have deleted the patron category' ); |
| 59 |
|
59 |
|
|
|
60 |
my $new_category_4 = Koha::Patron::Category->new( |
| 61 |
{ categorycode => 'mycatcodeW', |
| 62 |
category_type => 'A', |
| 63 |
description => 'mycatdescW', |
| 64 |
upperagelimit => '', |
| 65 |
dateofbirthrequired => '', |
| 66 |
} |
| 67 |
)->store; |
| 68 |
is( Koha::Patron::Categories->search->count, $nb_of_categories + 2, 'upperagelimit and dateofbirthrequired should have a default value if empty string is passed' ); |
| 69 |
|
| 60 |
$schema->storage->txn_rollback; |
70 |
$schema->storage->txn_rollback; |
| 61 |
|
71 |
|
| 62 |
1; |
72 |
1; |
| 63 |
- |
|
|