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:
parent
771e63f5bf
commit
3bbc861330
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in New Issue