[Koha-patches] [PATCH] bug 2525: fixing tests for misc/cronjobs/longoverdue.pl
Andrew Moore
andrew.moore at liblime.com
Fri Aug 15 18:04:13 CEST 2008
This patch fixes the tests so that they include the new required parameters for longoverdues.pl.
---
t/lib/KohaTest/Scripts/longoverdue.pm | 2 +-
t/lib/dog.t | 37 +++++++++++++++++++++++++++++++++
2 files changed, 38 insertions(+), 1 deletions(-)
create mode 100644 t/lib/dog.t
diff --git a/t/lib/KohaTest/Scripts/longoverdue.pm b/t/lib/KohaTest/Scripts/longoverdue.pm
index dcfb1a4..ea1c317 100644
--- a/t/lib/KohaTest/Scripts/longoverdue.pm
+++ b/t/lib/KohaTest/Scripts/longoverdue.pm
@@ -86,7 +86,7 @@ sub set_overdue_item_lost : Test( 12 ) {
is( $issued_item->{'itemlost'}, 0, 'the item is not lost' );
# diag( Data::Dumper->Dump( [ $issued_item ], [ 'issued_item' ] ) );
- qx( ../misc/cronjobs/longoverdue.pl );
+ qx( ../misc/cronjobs/longoverdue.pl --lost 90=2 --confirm );
my $lost_item = C4::Items::GetItem( $self->{'overdueitemnumber'} );
is( $lost_item->{'onloan'}, $duedateyyyymmdd, "the item is checked out and due $duedatestring" );
diff --git a/t/lib/dog.t b/t/lib/dog.t
new file mode 100644
index 0000000..0e03a7a
--- /dev/null
+++ b/t/lib/dog.t
@@ -0,0 +1,37 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+
+=head2
+
+
+
+=cut
+
+use C4::Context;
+use Data::Dumper;
+use Test::More;
+
+use Test::Class::Load qw ( t/lib );
+
+# KohaTest::clear_test_database();
+# KohaTest::create_test_database();
+
+# KohaTest::start_zebrasrv();
+# KohaTest::start_zebraqueue_daemon();
+
+# if ($ENV{'TEST_CLASS'}) {
+# # assume only one test class is specified;
+# # should extend to allow multiples, but that will
+# # mean changing how test classes are loaded.
+# eval "KohaTest::$ENV{'TEST_CLASS'}->runtests";
+# } else {
+# Test::Class->runtests;
+# }
+
+# KohaTest::stop_zebraqueue_daemon();
+# KohaTest::stop_zebrasrv();
+
+Test::Class->runtests;
+
--
1.5.6
More information about the Koha-patches
mailing list