Bug 12357: [QA Followup] - Unit Test
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> This works with next patch Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
39ed3dce71
commit
d997b0b1f0
1 changed files with 22 additions and 5 deletions
|
@ -1,18 +1,22 @@
|
|||
#!/usr/bin/perl
|
||||
#
|
||||
# This Koha test module is a stub!
|
||||
# Add more tests here!!!
|
||||
|
||||
use Modern::Perl;
|
||||
|
||||
use Test::More tests => 11;
|
||||
use Test::More tests => 12;
|
||||
use MARC::Record;
|
||||
|
||||
use C4::Context;
|
||||
|
||||
BEGIN {
|
||||
use_ok('C4::Record');
|
||||
}
|
||||
|
||||
#my ($marc,$to_flavour,$from_flavour,$encoding) = @_;
|
||||
my $dbh = C4::Context->dbh;
|
||||
# Start transaction
|
||||
$dbh->{AutoCommit} = 0;
|
||||
$dbh->{RaiseError} = 1;
|
||||
|
||||
C4::Context->set_preference( "BibtexExportAdditionalFields", q{} );
|
||||
|
||||
my @marcarray=marc2marc;
|
||||
is ($marcarray[0],"Feature not yet implemented\n","error works");
|
||||
|
@ -106,6 +110,19 @@ my $test5xml=qq(\@book{testID,
|
|||
|
||||
is ($bibtex, $test5xml, "testing bibtex");
|
||||
|
||||
C4::Context->set_preference( "BibtexExportAdditionalFields", "'\@': 260\$b\ntest: 260\$b" );
|
||||
$bibtex = marc2bibtex( $marc, 'testID' );
|
||||
my $test6xml = qq(\@Scholastic{testID,
|
||||
author = {Rowling, J.K.},
|
||||
title = {Harry potter},
|
||||
publisher = {Scholastic},
|
||||
year = {2001},
|
||||
test = {Scholastic}
|
||||
}
|
||||
);
|
||||
is( $bibtex, $test6xml, "testing bibtex" );
|
||||
C4::Context->set_preference( "BibtexExportAdditionalFields", q{} );
|
||||
|
||||
$marc->append_fields(MARC::Field->new(
|
||||
'264', '3', '1', b => 'Reprints', c => '2011'
|
||||
));
|
||||
|
|
Loading…
Reference in a new issue