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

(-)a/t/db_dependent/Koha/Item/Transfer.t (-24 / +1 lines)
Lines 24-30 use Koha::DateUtils; Link Here
24
24
25
use t::lib::TestBuilder;
25
use t::lib::TestBuilder;
26
26
27
use Test::More tests => 7;
27
use Test::More tests => 6;
28
use Test::Exception;
28
use Test::Exception;
29
29
30
my $schema  = Koha::Database->new->schema;
30
my $schema  = Koha::Database->new->schema;
Lines 52-79 subtest 'item relation tests' => sub { Link Here
52
    $schema->storage->txn_rollback;
52
    $schema->storage->txn_rollback;
53
};
53
};
54
54
55
subtest 'from_library relation tests' => sub {
56
    plan tests => 2;
57
58
    $schema->storage->txn_begin;
59
60
    my $library = $builder->build_object( { class => 'Koha::Libraries' } );
61
    my $transfer = $builder->build_object(
62
        {
63
            class => 'Koha::Item::Transfers',
64
            value => {
65
                frombranch => $library->branchcode,
66
            }
67
        }
68
    );
69
70
    my $from_library = $transfer->from_library;
71
    is( ref( $from_library ), 'Koha::Library', 'Koha::Item::Transfer->from_library should return a Koha::Library' );
72
    is( $from_library->branchcode, $library->branchcode, 'Koha::Item::Transfer->from_library should return the correct library' );
73
74
    $schema->storage->txn_rollback;
75
};
76
77
subtest 'to_library relation tests' => sub {
55
subtest 'to_library relation tests' => sub {
78
    plan tests => 2;
56
    plan tests => 2;
79
57
80
- 

Return to bug 28520