|
Lines 17-23
Link Here
|
| 17 |
|
17 |
|
| 18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
| 19 |
|
19 |
|
| 20 |
use Test::More tests => 23; # +1 |
20 |
use Test::More tests => 24; |
| 21 |
use Test::Exception; |
21 |
use Test::Exception; |
| 22 |
use Test::Warn; |
22 |
use Test::Warn; |
| 23 |
|
23 |
|
|
Lines 1061-1066
subtest 'Recalls tests' => sub {
Link Here
|
| 1061 |
$schema->storage->txn_rollback; |
1061 |
$schema->storage->txn_rollback; |
| 1062 |
}; |
1062 |
}; |
| 1063 |
|
1063 |
|
|
|
1064 |
subtest 'ill_requests() tests' => sub { |
| 1065 |
|
| 1066 |
plan tests => 3; |
| 1067 |
|
| 1068 |
$schema->storage->txn_begin; |
| 1069 |
|
| 1070 |
my $biblio = $builder->build_sample_biblio; |
| 1071 |
|
| 1072 |
my $rs = $biblio->ill_requests; |
| 1073 |
is( ref($rs), 'Koha::Illrequests' ); |
| 1074 |
is( $rs->count, 0, 'No linked requests' ); |
| 1075 |
|
| 1076 |
foreach ( 1..10 ) { |
| 1077 |
$builder->build_object( |
| 1078 |
{ |
| 1079 |
class => 'Koha::Illrequests', |
| 1080 |
value => { biblio_id => $biblio->id } |
| 1081 |
} |
| 1082 |
); |
| 1083 |
} |
| 1084 |
|
| 1085 |
is( $biblio->ill_requests->count, 10, 'Linked requests are present' ); |
| 1086 |
|
| 1087 |
$schema->storage->txn_rollback; |
| 1088 |
}; |
| 1089 |
|
| 1064 |
subtest 'item_groups() tests' => sub { |
1090 |
subtest 'item_groups() tests' => sub { |
| 1065 |
|
1091 |
|
| 1066 |
plan tests => 6; |
1092 |
plan tests => 6; |
| 1067 |
- |
|
|