Bug 15947: move SIPILS.t to DB-dependent test directory
authorGalen Charlton <gmcharlt@gmail.com>
Tue, 1 Mar 2016 13:51:56 +0000 (13:51 +0000)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Wed, 2 Mar 2016 22:02:10 +0000 (22:02 +0000)
SIPILS.t requires an active koha-conf.xml to pass,
and consequently is moved to t/db_dependent so that
'make test' can succeed.

To test
-------
[1] Unset KOHA_CONF and either do a make test or a
    prove -v t/SIPILS.t.  Note that the tests fail.
[2] Apply the patch and run make test again; this time,
    the test suite should pass.
[3] Verify that with KOHA_CONF *set*,
    prove -v t/db_dependent/SIPILS.t passes.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
t/SIPILS.t [deleted file]
t/db_dependent/SIPILS.t [new file with mode: 0755]

diff --git a/t/SIPILS.t b/t/SIPILS.t
deleted file mode 100755 (executable)
index 196c9b2..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/perl
-
-# This file is part of Koha.
-#
-# Koha is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# Koha is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Koha; if not, see <http://www.gnu.org/licenses>.
-
-use Modern::Perl;
-
-use Test::More tests => 9;
-
-BEGIN {
-    use_ok('C4::SIP::ILS');
-}
-
-my $class = 'C4::SIP::ILS';
-my $institution = { id => 'CPL', };
-
-my $ils = $class->new($institution);
-
-isa_ok( $ils, $class );
-
-# Check all methods required for interface are there
-# NB the mon_block routines are not here but Sip.pm thinks it can call them
-my @methods = (
-    qw( find_patron find_item checkout_ok checkin_ok offline_ok status_update_ok
-      offline_ok checkout checkin end_patron_session pay_fee add_hold cancel_hold
-      alter_hold renew renew_all)
-);
-
-can_ok( $ils, @methods );
-
-is( $ils->institution(), 'CPL', 'institution method returns id' );
-
-is( $ils->institution_id(), 'CPL', 'institution_id method returns id' );
-
-is( $ils->supports('checkout'), 1, 'checkout supported' );
-
-is( $ils->supports('security_inhibit'),
-    q{}, 'unsupported feature returns false' );
-
-is( $ils->test_cardnumber_compare( 'A1234', 'a1234' ),
-    1, 'borrower bc test is case insensitive' );
-
-is( $ils->test_cardnumber_compare( 'A1234', 'b1234' ),
-    q{}, 'borrower bc test identifies difference' );
diff --git a/t/db_dependent/SIPILS.t b/t/db_dependent/SIPILS.t
new file mode 100755 (executable)
index 0000000..196c9b2
--- /dev/null
@@ -0,0 +1,56 @@
+#!/usr/bin/perl
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
+
+use Modern::Perl;
+
+use Test::More tests => 9;
+
+BEGIN {
+    use_ok('C4::SIP::ILS');
+}
+
+my $class = 'C4::SIP::ILS';
+my $institution = { id => 'CPL', };
+
+my $ils = $class->new($institution);
+
+isa_ok( $ils, $class );
+
+# Check all methods required for interface are there
+# NB the mon_block routines are not here but Sip.pm thinks it can call them
+my @methods = (
+    qw( find_patron find_item checkout_ok checkin_ok offline_ok status_update_ok
+      offline_ok checkout checkin end_patron_session pay_fee add_hold cancel_hold
+      alter_hold renew renew_all)
+);
+
+can_ok( $ils, @methods );
+
+is( $ils->institution(), 'CPL', 'institution method returns id' );
+
+is( $ils->institution_id(), 'CPL', 'institution_id method returns id' );
+
+is( $ils->supports('checkout'), 1, 'checkout supported' );
+
+is( $ils->supports('security_inhibit'),
+    q{}, 'unsupported feature returns false' );
+
+is( $ils->test_cardnumber_compare( 'A1234', 'a1234' ),
+    1, 'borrower bc test is case insensitive' );
+
+is( $ils->test_cardnumber_compare( 'A1234', 'b1234' ),
+    q{}, 'borrower bc test identifies difference' );