@@ -, +, @@ tests --- t/db_dependent/Koha/Acquisition/Currencies.t | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/t/db_dependent/Koha/Acquisition/Currencies.t +++ a/t/db_dependent/Koha/Acquisition/Currencies.t @@ -19,10 +19,18 @@ use Modern::Perl; use Test::More tests => 6; +use Koha::Database; use Koha::Acquisition::Currency; use Koha::Acquisition::Currencies; use t::lib::TestBuilder; +my $schema = Koha::Database->schema; +$schema->storage->txn_begin; +my $dbh = C4::Context->dbh; + +# Start transaction +$dbh->{RaiseError} = 1; + my $builder = t::lib::TestBuilder->new; my $nb_of_currencies = Koha::Acquisition::Currencies->search->count; my $new_currency_1 = Koha::Acquisition::Currency->new({ @@ -56,3 +64,4 @@ is ( $nb_of_active_currencies, 1, 'Only 1 currency should be marked as active' ) $retrieved_currency_1->delete; is( Koha::Acquisition::Currencies->search->count, $nb_of_currencies + 1, 'Delete should have deleted the currency' ); + --