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 => 16; |
26 |
use Koha::Database; |
26 |
use Koha::Database; |
27 |
|
27 |
|
28 |
BEGIN { |
28 |
BEGIN { |
Lines 56-62
my @column_names = $source->columns();
Link Here
|
56 |
my $column_name = $column_names[0]; |
56 |
my $column_name = $column_names[0]; |
57 |
ok( column_exists( 'borrowers', $column_name ), 'Known column does exist' ); |
57 |
ok( column_exists( 'borrowers', $column_name ), 'Known column does exist' ); |
58 |
ok( ! column_exists( 'borrowers', 'xxx'), 'Column xxx does not exist' ); |
58 |
ok( ! column_exists( 'borrowers', 'xxx'), 'Column xxx does not exist' ); |
59 |
|
59 |
{ |
|
|
60 |
my $dbh = C4::Context->dbh; |
61 |
$dbh->{RaiseError} = 1; |
62 |
ok( ! column_exists( 'this_table_will_never_exist', 'xxx'), 'Column xxx does not exist, the table does not exist' ); |
63 |
} |
60 |
my @constraint_names = $source->unique_constraint_names(); |
64 |
my @constraint_names = $source->unique_constraint_names(); |
61 |
my $constraint_name = $constraint_names[0]; |
65 |
my $constraint_name = $constraint_names[0]; |
62 |
ok( index_exists( 'borrowers', $constraint_name), 'Known contraint does exist' ); |
66 |
ok( index_exists( 'borrowers', $constraint_name), 'Known contraint does exist' ); |
63 |
- |
|
|