[Koha-patches] [PATCH] Bug 2047: some tests for C4::Biblio::get_biblio_authorised_values

Andrew Moore andrew.moore at liblime.com
Fri May 23 19:36:30 CEST 2008


I had these tests laying around for a while. I just forgot to commit them.

No functional or documentation changes needed.
---
 .../Biblio/get_biblio_authorised_values.pm         |   48 ++++++++++++++++++++
 1 files changed, 48 insertions(+), 0 deletions(-)
 create mode 100644 t/lib/KohaTest/Biblio/get_biblio_authorised_values.pm

diff --git a/t/lib/KohaTest/Biblio/get_biblio_authorised_values.pm b/t/lib/KohaTest/Biblio/get_biblio_authorised_values.pm
new file mode 100644
index 0000000..aab03a0
--- /dev/null
+++ b/t/lib/KohaTest/Biblio/get_biblio_authorised_values.pm
@@ -0,0 +1,48 @@
+package KohaTest::Biblio::get_biblio_authorised_values;
+use base qw( KohaTest::Biblio );
+
+use strict;
+use warnings;
+
+use Test::More;
+
+use C4::Biblio;
+
+=head2 STARTUP METHODS
+
+These get run once, before the main test methods in this module
+
+=head3 insert_test_data
+
+=cut
+
+sub insert_test_data : Test( startup => 71 ) {
+    my $self = shift;
+    
+    # I'm going to add a bunch of biblios so that I can search for them.
+    $self->add_biblios( count     => 10,
+                        add_items => 1 );
+    
+
+}
+
+=head2 TEST METHODS
+
+standard test methods
+
+=head3 basic_test
+
+basic usage.
+
+=cut
+
+sub basic_test : Test( 1 ) {
+    my $self = shift;
+
+    ok( $self->{'biblios'}[0], 'we have a biblionumber' );
+    my $authorised_values = C4::Biblio::get_biblio_authorised_values( $self->{'biblios'}[0] );
+    diag( Data::Dumper->Dump( [ $authorised_values ], [ 'authorised_values' ] ) );
+    
+}
+
+1;
-- 
1.5.5.GIT




More information about the Koha-patches mailing list