Bug 15669: Add a test for GetModificationTemplates

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2016-03-03 10:28:56 +00:00 committed by Brendan A Gallagher
parent 771e63f5bf
commit 3bbc861330
1 changed files with 11 additions and 1 deletions

View File

@ -1,6 +1,6 @@
use Modern::Perl;
use Test::More tests => 94;
use Test::More tests => 95;
use Koha::SimpleMARC;
@ -336,6 +336,16 @@ is_deeply( \@fields_245a, [
'Bad title'
], 'delete field has been deleted the right field"' );
subtest 'GetModificationTemplates' => sub {
plan tests => 1;
$dbh->do(q|DELETE FROM marc_modification_templates|);
AddModificationTemplate("zzz");
AddModificationTemplate("aaa");
AddModificationTemplate("mmm");
my @templates = GetModificationTemplates();
is_deeply( [map{$_->{name}} @templates], ['aaa', 'mmm', 'zzz'] );
};
sub new_record {
my $record = MARC::Record->new;
$record->leader('03174nam a2200445 a 4500');