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

(-)a/t/db_dependent/Koha/Object.t (-2 / +24 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 12;
20
use Test::More tests => 13;
21
use Test::Exception;
21
use Test::Exception;
22
use Test::Warn;
22
use Test::Warn;
23
use DateTime;
23
use DateTime;
Lines 470-472 subtest 'unblessed_all_relateds' => sub { Link Here
470
470
471
    $schema->storage->txn_rollback;
471
    $schema->storage->txn_rollback;
472
};
472
};
473
- 
473
474
subtest 'get_from_storage' => sub {
475
    plan tests => 4;
476
477
    $schema->storage->txn_begin;
478
479
    my $biblio = $builder->build_sample_biblio;
480
481
    my $old_title = $biblio->title;
482
    my $new_title = 'new_title';
483
    Koha::Biblios->find( $biblio->biblionumber )->title($new_title)->store;
484
485
    is( $biblio->title, $old_title, 'current $biblio should not be modified' );
486
    is( $biblio->get_from_storage->title,
487
        $new_title, 'get_from_storage should return an updated object' );
488
489
    Koha::Biblios->find( $biblio->biblionumber )->delete;
490
    is( ref($biblio), 'Koha::Biblio', 'current $biblio should not be deleted' );
491
    is( $biblio->get_from_storage, undef,
492
        'get_from_storage should return undef if the object has been deleted' );
493
494
    $schema->storage->txn_rollback;
495
};

Return to bug 24213