Bug 2047: some tests for C4::Biblio::get_biblio_authorised_values
authorAndrew Moore <andrew.moore@liblime.com>
Fri, 23 May 2008 17:36:30 +0000 (12:36 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 27 May 2008 11:52:13 +0000 (06:52 -0500)
I had these tests laying around for a while. I just forgot to commit them.

No functional or documentation changes needed.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
t/lib/KohaTest/Biblio/get_biblio_authorised_values.pm [new file with mode: 0644]

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 (file)
index 0000000..aab03a0
--- /dev/null
@@ -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;