Bug 16155: Adjust TestBuilder.t
[koha.git] / t / db_dependent / MarcModificationTemplates.t
index f54527e..3ea702a 100644 (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');