|
Lines 21-29
use Modern::Perl;
Link Here
|
| 21 |
use Test::More tests => 3; |
21 |
use Test::More tests => 3; |
| 22 |
use Koha::BiblioFramework; |
22 |
use Koha::BiblioFramework; |
| 23 |
use Koha::BiblioFrameworks; |
23 |
use Koha::BiblioFrameworks; |
| 24 |
use t::lib::TestBuilder; |
|
|
| 25 |
|
24 |
|
| 26 |
my $builder = t::lib::TestBuilder->new; |
25 |
my $schema = Koha::Database->new->schema; |
|
|
26 |
$schema->storage->txn_begin; |
| 27 |
|
| 27 |
my $nb_of_frameworks = Koha::BiblioFrameworks->search->count; |
28 |
my $nb_of_frameworks = Koha::BiblioFrameworks->search->count; |
| 28 |
my $new_framework_1 = Koha::BiblioFramework->new({ |
29 |
my $new_framework_1 = Koha::BiblioFramework->new({ |
| 29 |
frameworkcode => 'mfw1', |
30 |
frameworkcode => 'mfw1', |
|
Lines 41-43
is( $retrieved_framework_1->frameworktext, $new_framework_1->frameworktext, 'Fin
Link Here
|
| 41 |
|
42 |
|
| 42 |
$retrieved_framework_1->delete; |
43 |
$retrieved_framework_1->delete; |
| 43 |
is( Koha::BiblioFrameworks->search->count, $nb_of_frameworks + 1, 'Delete should have deleted the biblio framework' ); |
44 |
is( Koha::BiblioFrameworks->search->count, $nb_of_frameworks + 1, 'Delete should have deleted the biblio framework' ); |
| 44 |
- |
45 |
$schema->storage->txn_rollback; |