Bug 33146: Unit tests
[koha-ffzg.git] / t / db_dependent / Biblio.t
index 67cba63..ab8c2f6 100755 (executable)
@@ -17,7 +17,7 @@
 
 use Modern::Perl;
 
-use Test::More tests => 15;
+use Test::More tests => 16;
 use Test::MockModule;
 use Test::Warn;
 use List::MoreUtils qw( uniq );
@@ -852,6 +852,21 @@ subtest 'autoControlNumber tests' => sub {
 
 };
 
+subtest 'record test' => sub {
+    plan tests => 1;
+
+    my $marc_record = MARC::Record->new;
+    $marc_record->append_fields( create_isbn_field( '0590353403', 'MARC21' ) );
+
+    my ($biblionumber) = C4::Biblio::AddBiblio( $marc_record, '' );
+
+    my $biblio = Koha::Biblios->find($biblionumber);
+
+    is( $biblio->record->as_formatted,
+        $biblio->metadata->record->as_formatted );
+};
+
+
 
 # Cleanup
 Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" );