View | Details | Raw Unified | Return to bug 37510
Collapse All | Expand All

(-)a/t/db_dependent/Koha/Object.t (-2 / +23 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 22;
20
use Test::More tests => 23;
21
use Test::Exception;
21
use Test::Exception;
22
use Test::Warn;
22
use Test::Warn;
23
23
Lines 1237-1239 subtest 'is_accessible() tests' => sub { Link Here
1237
1237
1238
    $schema->storage->txn_rollback;
1238
    $schema->storage->txn_rollback;
1239
};
1239
};
1240
- 
1240
1241
subtest 'delete() tests' => sub {
1242
1243
    plan tests => 2;
1244
1245
    $schema->storage->txn_begin;
1246
1247
    my $rs     = $builder->build_object( { class => 'Koha::RecordSources' } );
1248
    my $biblio = $builder->build_sample_biblio();
1249
1250
    $biblio->metadata->set( { record_source_id => $rs->id } )->store();
1251
1252
    throws_ok { $rs->delete(); }
1253
    'Koha::Exception';
1254
1255
    $biblio->metadata->set( { record_source_id => undef } )->store();
1256
1257
    lives_ok { $rs->delete(); }
1258
    'No exception thrown';
1259
1260
    $schema->storage->txn_rollback;
1261
};

Return to bug 37510