Bug 18226 - Remove "use Test::DBIx::Class" instantiations' dangerous code duplication. Replace mock_dbh 1
t/00-load.t already checks if all of the perl modules can be compiled. The tests deleted in this commit do a duplicate test with t/00-load.t Hence they have become unnecessary. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
fb3654077f
commit
1985e6e4b3
|
|
@ -31,7 +31,7 @@ use t::lib::Mocks;
|
|||
|
||||
=cut
|
||||
|
||||
my $context_module = t::lib::Mocks::mock_dbh;
|
||||
use Test::DBIx::Class;
|
||||
|
||||
# Loop through the C4:: modules
|
||||
my $lib = File::Spec->rel2abs('C4');
|
||||
|
|
|
|||
28
t/Breeding.t
28
t/Breeding.t
|
|
@ -1,28 +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 => 1;
|
||||
use t::lib::Mocks;
|
||||
|
||||
BEGIN {
|
||||
# Mock the DB connexion and C4::Context
|
||||
my $context = t::lib::Mocks::mock_dbh;
|
||||
use_ok('C4::Breeding');
|
||||
}
|
||||
|
||||
|
|
@ -9,7 +9,7 @@ use Koha::Schema;
|
|||
use_ok('C4::Members');
|
||||
|
||||
BEGIN {
|
||||
t::lib::Mocks::mock_dbh;
|
||||
use Test::DBIx::Class;
|
||||
}
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
|
|
|
|||
29
t/Message.t
29
t/Message.t
|
|
@ -1,29 +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 => 1;
|
||||
use t::lib::Mocks;
|
||||
|
||||
BEGIN {
|
||||
# Mock the DB connexion and C4::Context
|
||||
my $context = t::lib::Mocks::mock_dbh;
|
||||
use_ok('C4::Message');
|
||||
}
|
||||
|
||||
1;
|
||||
29
t/Overdues.t
29
t/Overdues.t
|
|
@ -1,29 +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 => 1;
|
||||
use t::lib::Mocks;
|
||||
|
||||
BEGIN {
|
||||
# Mock the DB connexion and C4::Context
|
||||
my $context = t::lib::Mocks::mock_dbh;
|
||||
use_ok('C4::Overdues');
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
@ -22,7 +22,7 @@ use Test::Warn;
|
|||
use t::lib::Mocks;
|
||||
|
||||
BEGIN {
|
||||
t::lib::Mocks::mock_dbh;
|
||||
use Test::DBIx::Class;
|
||||
use_ok('Koha::Object');
|
||||
use_ok('Koha::Patron');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,29 +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 => 1;
|
||||
use t::lib::Mocks;
|
||||
|
||||
BEGIN {
|
||||
# Mock the DB connexion and C4::Context
|
||||
my $context = t::lib::Mocks::mock_dbh;
|
||||
use_ok('C4::RotatingCollections');
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
@ -21,7 +21,7 @@ use Test::More tests => 3;
|
|||
use t::lib::Mocks;
|
||||
|
||||
# Mock the DB connexion and C4::Context
|
||||
my $context = t::lib::Mocks::mock_dbh;
|
||||
use Test::DBIx::Class;
|
||||
|
||||
use_ok('C4::Search');
|
||||
can_ok('C4::Search',
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ use Test::MockModule;
|
|||
use t::lib::Mocks;
|
||||
|
||||
# Mock the DB connexion and C4::Context
|
||||
my $context = t::lib::Mocks::mock_dbh;
|
||||
use Test::DBIx::Class;
|
||||
|
||||
use_ok('Koha::SuggestionEngine');
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ foreach (sort @keys) {
|
|||
ok($config = $koha->{config}, 'Getting $koha->{config} ');
|
||||
|
||||
# Testing syspref caching
|
||||
t::lib::Mocks::mock_dbh;
|
||||
use Test::DBIx::Class;
|
||||
|
||||
my $history;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue