Lines 64-74
subtest 'after_biblio_action() and after_item_action() hooks tests' => sub {
Link Here
|
64 |
|
64 |
|
65 |
my $item; |
65 |
my $item; |
66 |
warning_like { $item = $builder->build_sample_item({ biblionumber => $biblio_id }); } |
66 |
warning_like { $item = $builder->build_sample_item({ biblionumber => $biblio_id }); } |
67 |
qr/after_item_action called with action: create, ref: Koha::Item/, |
67 |
qr/after_item_action called with action: create, ref: Koha::Item item_id defined: yes itemnumber defined: yes/, |
68 |
'AddItem calls the hook with action=create'; |
68 |
'AddItem calls the hook with action=create'; |
69 |
|
69 |
|
70 |
warning_like { $item->location('shelves')->store; } |
70 |
warning_like { $item->location('shelves')->store; } |
71 |
qr/after_item_action called with action: modify, ref: Koha::Item/, |
71 |
qr/after_item_action called with action: modify, ref: Koha::Item item_id defined: yes itemnumber defined: yes/, |
72 |
'ModItem calls the hook with action=modify'; |
72 |
'ModItem calls the hook with action=modify'; |
73 |
|
73 |
|
74 |
warning_like { $item->delete; } |
74 |
warning_like { $item->delete; } |