|
Link Here
|
| 15 |
our $mgr; |
15 |
our $mgr; |
| 16 |
|
16 |
|
| 17 |
subtest '->new, dry_run' => sub { |
17 |
subtest '->new, dry_run' => sub { |
| 18 |
plan tests => 6; |
18 |
plan tests => 9; |
| 19 |
$schema->storage->txn_begin; # just cosmetic, no changes expected in a dry run |
19 |
$schema->storage->txn_begin; # just cosmetic, no changes expected in a dry run |
| 20 |
|
20 |
|
| 21 |
# Two exceptions on dbh parameter |
21 |
# Two exceptions on dbh parameter |
|
Link Here
|
| 28 |
unlink $filename; |
28 |
unlink $filename; |
| 29 |
throws_ok { $mgr->reset_to_schema({ dry_run => 1, table => 'biblio' }) } 'Koha::Exceptions::FileNotFound', 'Schema deleted'; |
29 |
throws_ok { $mgr->reset_to_schema({ dry_run => 1, table => 'biblio' }) } 'Koha::Exceptions::FileNotFound', 'Schema deleted'; |
| 30 |
|
30 |
|
|
|
31 |
# Check case of columns from information_schema (MySQL8 defaults to uppercase) |
| 32 |
my $columns = $mgr->_fetch_stored_comments({ table => 'article_requests' }); |
| 33 |
ok( exists $columns->[0]->{table_name}, 'Check table_name column' ); |
| 34 |
ok( exists $columns->[0]->{column_name}, 'Check column_name column' ); |
| 35 |
ok( exists $columns->[0]->{column_comment}, 'Check column_comment column' ); |
| 36 |
|
| 31 |
# Clear comments for article_requests in dry run mode |
37 |
# Clear comments for article_requests in dry run mode |
| 32 |
my $messages = []; |
38 |
my $messages = []; |
| 33 |
$mgr->clear( { table => 'article_requests', dry_run => 1 }, $messages ); |
39 |
$mgr->clear( { table => 'article_requests', dry_run => 1 }, $messages ); |
| 34 |
- |
|
|