Lines 6-17
Link Here
|
6 |
use strict; |
6 |
use strict; |
7 |
use warnings; |
7 |
use warnings; |
8 |
|
8 |
|
9 |
use Test::More tests => 17; |
9 |
use Test::More tests => 18; |
10 |
|
10 |
|
11 |
BEGIN { |
11 |
BEGIN { |
12 |
use_ok('C4::Installer::PerlModules'); |
12 |
use_ok('C4::Installer::PerlModules'); |
13 |
} |
13 |
} |
14 |
|
14 |
|
|
|
15 |
$C4::Installer::PerlModules::PERL_DEPS->{'Local::Module::Missing'} = { |
16 |
'required' => '1', |
17 |
'min_ver' => '0.9.3', |
18 |
'usage' => "Checking the minimum version required for a missing module", |
19 |
}; |
20 |
|
15 |
my $modules; |
21 |
my $modules; |
16 |
ok ($modules = C4::Installer::PerlModules->new(), 'Tests modules object'); |
22 |
ok ($modules = C4::Installer::PerlModules->new(), 'Tests modules object'); |
17 |
my $prereq_pm = $modules->prereq_pm(); |
23 |
my $prereq_pm = $modules->prereq_pm(); |
Lines 37-39
my @module_list = $modules->module_list;
Link Here
|
37 |
ok (exists($params{"DBI"}), 'DBI exists in array'); |
43 |
ok (exists($params{"DBI"}), 'DBI exists in array'); |
38 |
is ($modules->required('module'=>"String::Random"),1, 'String::Random should return 1 since required'); |
44 |
is ($modules->required('module'=>"String::Random"),1, 'String::Random should return 1 since required'); |
39 |
ok (!$modules->version_info(), "Testing empty modules"); |
45 |
ok (!$modules->version_info(), "Testing empty modules"); |
40 |
- |
46 |
|
|
|
47 |
my $version_check = $modules->version_info('module'=>"Local::Module::Missing"); |
48 |
is($version_check->{"Local::Module::Missing"}->{"min_ver"},"0.9.3","Minimum version found for missing module"); |