Bug 17913: [Follow-up] Another small fix for UNIMARC
[koha.git] / t / Breeding.t
old mode 100644 (file)
new mode 100755 (executable)
index 36fa428..6effd9f
@@ -1,5 +1,28 @@
-BEGIN { $| = 1; print "1..1\n"; }
-END {print "not ok 1\n" unless $loaded;}
-use C4::Breeding;
-$loaded = 1;
-print "ok 1\n";
+#!/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 => 1;
+use t::lib::Mocks;
+
+BEGIN {
+    # Mock the DB connexion and C4::Context
+    my $context = t::lib::Mocks::mock_dbh;
+    use_ok('C4::Breeding');
+}
+