Bug 16582 t/Price.t test should pass if Test::DBIx::Class is not available

TEST PLAN
---------
1) prove t/Prices.t
   -- failure
2) apply patch
3) prove t/Prices.t
   -- nicely skipped when Test::DBIx::Class is not available.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 5ba5f9e0c5)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 6523236123)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
This commit is contained in:
Mark Tompsett 2016-05-24 22:31:15 -04:00 committed by Julian Maurice
parent 3cd0ac25fa
commit 2131a6dec2
1 changed files with 14 additions and 6 deletions

View File

@ -1,15 +1,23 @@
use Modern::Perl;
use Test::More tests => 17;
use Test::More;
use Test::MockModule;
use t::lib::Mocks;
use Module::Load::Conditional qw/check_install/;
BEGIN {
use_ok('C4::Acquisition');
use_ok('C4::Bookseller');
use_ok('C4::Context');
use_ok('Koha::Number::Price');
};
if ( check_install( module => 'Test::DBIx::Class' ) ) {
plan tests => 17;
} else {
plan skip_all => "Need Test::DBIx::Class"
}
}
use_ok('C4::Acquisition');
use_ok('C4::Bookseller');
use_ok('C4::Context');
use_ok('Koha::Number::Price');
t::lib::Mocks::mock_preference( 'gist', '0.02|0.05|0.196' );