|
Lines 17-23
Link Here
|
| 17 |
|
17 |
|
| 18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
| 19 |
|
19 |
|
| 20 |
use Test::More tests => 51; |
20 |
use Test::More tests => 53; |
| 21 |
use C4::Context; |
21 |
use C4::Context; |
| 22 |
use C4::RotatingCollections; |
22 |
use C4::RotatingCollections; |
| 23 |
use C4::Biblio; |
23 |
use C4::Biblio; |
|
Lines 316-321
is( C4::RotatingCollections::isItemInThisCollection($item_id1),
Link Here
|
| 316 |
is( C4::RotatingCollections::isItemInThisCollection(), |
316 |
is( C4::RotatingCollections::isItemInThisCollection(), |
| 317 |
0, "isItemInThisCollection returns 0 if no params given" ); |
317 |
0, "isItemInThisCollection returns 0 if no params given" ); |
| 318 |
|
318 |
|
|
|
319 |
#Re-add item to test deletion of collection |
| 320 |
AddItemToCollection( $collection_id1, $item_id1 ); |
| 321 |
|
| 319 |
#Test DeleteCollection |
322 |
#Test DeleteCollection |
| 320 |
is( DeleteCollection($collection_id2), 1, "Collection2 deleted" ); |
323 |
is( DeleteCollection($collection_id2), 1, "Collection2 deleted" ); |
| 321 |
is( DeleteCollection($collection_id1), 1, "Collection1 deleted" ); |
324 |
is( DeleteCollection($collection_id1), 1, "Collection1 deleted" ); |
|
Lines 330-332
is(
Link Here
|
| 330 |
$countcollection + 1, |
333 |
$countcollection + 1, |
| 331 |
"Two Collections have been deleted" |
334 |
"Two Collections have been deleted" |
| 332 |
); |
335 |
); |
| 333 |
- |
336 |
|
|
|
337 |
is( C4::RotatingCollections::isItemInAnyCollection($item_id1), |
| 338 |
0, "Item1 is no longer in a collection after it is deleted" ); |
| 339 |
is( |
| 340 |
C4::RotatingCollections::isItemInThisCollection( |
| 341 |
$item_id1, $collection_id1 |
| 342 |
), |
| 343 |
0, |
| 344 |
"Item1 is not in the deleted Collection1" |
| 345 |
); |
| 346 |
|
| 347 |
$schema->storage->txn_rollback; |