Lines 71-82
subtest 'after_biblio_action() and after_item_action() hooks tests' => sub {
Link Here
|
71 |
qr/after_item_action called with action: modify, ref: Koha::Item item_id defined: yes itemnumber defined: yes/, |
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 |
my $itemnumber = $item->id; |
74 |
warning_like { $item->delete; } |
75 |
warning_like { $item->delete; } |
75 |
qr/after_item_action called with action: delete/, |
76 |
qr/after_item_action called with action: delete, id: $itemnumber/, |
76 |
'DelItem calls the hook with action=delete, item_id passed'; |
77 |
'DelItem calls the hook with action=delete, item_id passed'; |
77 |
|
78 |
|
78 |
warning_like { C4::Biblio::DelBiblio( $biblio_id ); } |
79 |
warning_like { C4::Biblio::DelBiblio( $biblio_id ); } |
79 |
qr/after_biblio_action called with action: delete/, |
80 |
qr/after_biblio_action called with action: delete, id: $biblio_id/, |
80 |
'DelBiblio calls the hook with action=delete biblio_id passed'; |
81 |
'DelBiblio calls the hook with action=delete biblio_id passed'; |
81 |
|
82 |
|
82 |
$schema->storage->txn_rollback; |
83 |
$schema->storage->txn_rollback; |