From: Andrew Moore <[EMAIL PROTECTED]>
t/Labels.t was dependent on a working test database, so I'm moving those
tests into t/lib/KohaTest
Signed-off-by: Galen Charlton <[EMAIL PROTECTED]>
---
t/Labels.t | 14 ----------
t/lib/KohaTest/Labels.pm | 66 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 66 insertions(+), 14 deletions(-)
delete mode 100755 t/Labels.t
create mode 100644 t/lib/KohaTest/Labels.pm
diff --git a/t/Labels.t b/t/Labels.t
deleted file mode 100755
index ade5d7e..0000000
--- a/t/Labels.t
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/perl
-#
-# This Koha test module is a stub!
-# Add more tests here!!!
-
-use strict;
-use warnings;
-
-use Test::More tests => 1;
-
-BEGIN {
- use_ok('C4::Labels');
-}
-
diff --git a/t/lib/KohaTest/Labels.pm b/t/lib/KohaTest/Labels.pm
new file mode 100644
index 0000000..486ccb3
--- /dev/null
+++ b/t/lib/KohaTest/Labels.pm
@@ -0,0 +1,66 @@
+package KohaTest::Labels;
+use base qw( KohaTest );
+
+use strict;
+use warnings;
+
+use Test::More;
+
+use C4::Labels;
+sub testing_class { 'C4::Labels' }
+
+sub methods : Test( 1 ) {
+ my $self = shift;
+ my @methods = qw(
+
+ get_label_options
+ get_layouts
+ get_layout
+ get_active_layout
+ delete_layout
+ get_printingtypes
+ build_text_dropbox
+ get_text_fields
+ add_batch
+ get_highest_batch
+ get_batches
+ delete_batch
+ get_barcode_types
+ GetUnitsValue
+ GetTextWrapCols
+ GetActiveLabelTemplate
+ GetSingleLabelTemplate
+ SetActiveTemplate
+ set_active_layout
+ DeleteTemplate
+ SaveTemplate
+ CreateTemplate
+ GetAllLabelTemplates
+ add_layout
+ save_layout
+ GetAllPrinterProfiles
+ GetSinglePrinterProfile
+ SaveProfile
+ CreateProfile
+ DeleteProfile
+ GetAssociatedProfile
+ SetAssociatedProfile
+ GetLabelItems
+ GetItemFields
+ GetBarcodeData
+ _descKohaTables
+ GetPatronCardItems
+ deduplicate_batch
+ DrawSpineText
+ PrintText
+ DrawPatronCardText
+ DrawBarcode
+ build_circ_barcode
+ draw_boundaries
+ drawbox
+ );
+
+ can_ok( $self->testing_class, @methods );
+}
+
+1;
--
1.5.5.GIT
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches