bug 2295 [2/4]: moving icondirectories.t from t to xt
authorAndrew Moore <andrew.moore@liblime.com>
Mon, 7 Jul 2008 17:54:47 +0000 (12:54 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Mon, 7 Jul 2008 21:32:29 +0000 (16:32 -0500)
the icondirectories.t test depends on the database, so it needed to be
moved. But, it's really more of an author test since it's testinging the
correct structure of our distribution, so I'm moving it to xt/author.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
t/icondirectories.t [deleted file]
xt/author/icondirectories.t [new file with mode: 0644]

diff --git a/t/icondirectories.t b/t/icondirectories.t
deleted file mode 100644 (file)
index 6408d89..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/env perl
-
-=head1 NAME
-
-icondirectories.t - test to ensure that the two directories of icons
-in the staff and opac interface are identical.
-
-=head1 DESCRIPTION
-
-Tere are two directories of icons for media types, one for the opac
-and one for the staff interface. They need to be identical. This
-ensures that they are.
-
-=cut
-
-use strict;
-use warnings;
-
-use lib qw( .. );
-
-use C4::Koha;
-
-use Data::Dumper;
-use File::Find;
-use Test::More tests => 1;
-
-my $opac_icon_directory  = getitemtypeimagedir('opac');
-my $staff_icon_directory = getitemtypeimagedir('intranet');
-
-my $opac_icons; # hashref of filenames to sizes
-sub opac_wanted {
-    my $file = $File::Find::name;
-    $file =~ s/^$opac_icon_directory//;
-    $opac_icons->{ $file } = -s $_;
-}
-
-find( \&opac_wanted, $opac_icon_directory );
-
-my $staff_icons; # hashref of filenames to sizes
-sub staff_wanted {
-    my $file = $File::Find::name;
-    $file =~ s/^$staff_icon_directory//;
-    $staff_icons->{ $file } = -s $_;
-}
-find( \&staff_wanted, $staff_icon_directory );
-
-is_deeply( $opac_icons, $staff_icons )
-  or diag( Data::Dumper->Dump( [ $opac_icons ], [ 'opac_icons' ] ) );
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/xt/author/icondirectories.t b/xt/author/icondirectories.t
new file mode 100644 (file)
index 0000000..d6b0177
--- /dev/null
@@ -0,0 +1,63 @@
+#!/usr/bin/env perl
+
+=head1 NAME
+
+icondirectories.t - test to ensure that the two directories of icons
+in the staff and opac interface are identical.
+
+=head1 DESCRIPTION
+
+Tere are two directories of icons for media types, one for the opac
+and one for the staff interface. They need to be identical. This
+ensures that they are.
+
+=cut
+
+use strict;
+use warnings;
+
+use lib qw( .. );
+
+use Data::Dumper;
+use File::Find;
+use Test::More tests => 3;
+
+my $opac_icon_directory  = 'koha-tmpl/opac-tmpl/prog/itemtypeimg';
+my $staff_icon_directory = 'koha-tmpl/intranet-tmpl/prog/img/itemtypeimg';
+
+ok( -d $opac_icon_directory, "opac_icon_directory: $opac_icon_directory exists" );
+ok( -d $staff_icon_directory, "staff_icon_directory: $staff_icon_directory exists" );
+
+my $opac_icons; # hashref of filenames to sizes
+sub opac_wanted {
+    my $file = $File::Find::name;
+    $file =~ s/^$opac_icon_directory//;
+    $opac_icons->{ $file } = -s $_;
+}
+
+find( \&opac_wanted, $opac_icon_directory );
+
+my $staff_icons; # hashref of filenames to sizes
+sub staff_wanted {
+    my $file = $File::Find::name;
+    $file =~ s/^$staff_icon_directory//;
+    $staff_icons->{ $file } = -s $_;
+}
+find( \&staff_wanted, $staff_icon_directory );
+
+is_deeply( $opac_icons, $staff_icons )
+  or diag( Data::Dumper->Dump( [ $opac_icons ], [ 'opac_icons' ] ) );
+
+
+
+
+
+
+
+
+
+
+
+
+
+