|
Lines 22-28
Link Here
|
| 22 |
# Add more tests here!!! |
22 |
# Add more tests here!!! |
| 23 |
|
23 |
|
| 24 |
use Modern::Perl; |
24 |
use Modern::Perl; |
| 25 |
use Test::More tests => 15; |
25 |
use Test::More tests => 10; |
| 26 |
use Koha::Database; |
26 |
use Koha::Database; |
| 27 |
|
27 |
|
| 28 |
BEGIN { |
28 |
BEGIN { |
|
Lines 31-37
BEGIN {
Link Here
|
| 31 |
|
31 |
|
| 32 |
ok( my $installer = C4::Installer->new(), 'Testing NewInstaller' ); |
32 |
ok( my $installer = C4::Installer->new(), 'Testing NewInstaller' ); |
| 33 |
is( ref $installer, 'C4::Installer', 'Testing class of object' ); |
33 |
is( ref $installer, 'C4::Installer', 'Testing class of object' ); |
| 34 |
is( $installer->{'dbname'}, C4::Context->config('database'), 'Testing DbName' ); |
|
|
| 35 |
is( |
34 |
is( |
| 36 |
$installer->{'dbms'}, |
35 |
$installer->{'dbms'}, |
| 37 |
C4::Context->config('db_scheme') |
36 |
C4::Context->config('db_scheme') |
|
Lines 39-53
is(
Link Here
|
| 39 |
: 'mysql', |
38 |
: 'mysql', |
| 40 |
'Testing DbScheme' |
39 |
'Testing DbScheme' |
| 41 |
); |
40 |
); |
| 42 |
is( |
|
|
| 43 |
$installer->{'hostname'}, |
| 44 |
C4::Context->config('hostname'), |
| 45 |
'Testing Hostname' |
| 46 |
); |
| 47 |
is( $installer->{'port'}, C4::Context->config('port'), 'Testing Port' ); |
| 48 |
is( $installer->{'user'}, C4::Context->config('user'), 'Testing User' ); |
| 49 |
is( $installer->{'password'}, C4::Context->config('pass'), 'Testing Password' ); |
| 50 |
|
| 51 |
# The borrower table is known to have columns and constraints. |
41 |
# The borrower table is known to have columns and constraints. |
| 52 |
my $schema = Koha::Database->new->schema; |
42 |
my $schema = Koha::Database->new->schema; |
| 53 |
my $source = $schema->source('Borrower'); |
43 |
my $source = $schema->source('Borrower'); |
| 54 |
- |
|
|