Lines 68-78
subtest 'after_biblio_action() and after_item_action() hooks tests' => sub {
Link Here
|
68 |
qr/after_item_action called with action: create, ref: Koha::Item/, |
68 |
qr/after_item_action called with action: create, ref: Koha::Item/, |
69 |
'AddItem calls the hook with action=create'; |
69 |
'AddItem calls the hook with action=create'; |
70 |
|
70 |
|
71 |
warning_like { C4::Items::ModItem({ location => 'shelves' }, $biblio_id, $item->itemnumber); } |
71 |
warning_like { $item->location('shelves')->store; } |
72 |
qr/after_item_action called with action: modify, ref: Koha::Item/, |
72 |
qr/after_item_action called with action: modify, ref: Koha::Item/, |
73 |
'ModItem calls the hook with action=modify'; |
73 |
'ModItem calls the hook with action=modify'; |
74 |
|
74 |
|
75 |
warning_like { C4::Items::DelItem({ itemnumber => $item->itemnumber }); } |
75 |
warning_like { $item->delete; } |
76 |
qr/after_item_action called with action: delete/, |
76 |
qr/after_item_action called with action: delete/, |
77 |
'DelItem calls the hook with action=delete, item_id passed'; |
77 |
'DelItem calls the hook with action=delete, item_id passed'; |
78 |
|
78 |
|
79 |
- |
|
|