Lines 391-398
subtest 'RenameModificationTemplate' => sub {
Link Here
|
391 |
$dbh->do(q|DELETE FROM marc_modification_templates|); |
391 |
$dbh->do(q|DELETE FROM marc_modification_templates|); |
392 |
my $template_id = AddModificationTemplate("koah"); |
392 |
my $template_id = AddModificationTemplate("koah"); |
393 |
my $template_id2 = AddModificationTemplate("sma"); |
393 |
my $template_id2 = AddModificationTemplate("sma"); |
394 |
RenameModificationTemplate("koha", $template_id); |
394 |
RenameModificationTemplate({ 'template_name' => "koha", 'template_id' => $template_id}); |
395 |
RenameModificationTemplate("sam", $template_id2); |
395 |
RenameModificationTemplate({ 'template_name' => "sam", 'template_id' => $template_id2}); |
396 |
my @templates = GetModificationTemplates(); |
396 |
my @templates = GetModificationTemplates(); |
397 |
is_deeply( [map{$_->{name}} @templates], ['koha', 'sam'] ); |
397 |
is_deeply( [map{$_->{name}} @templates], ['koha', 'sam'] ); |
398 |
}; |
398 |
}; |