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

(-)a/t/db_dependent/Koha/Acquisition/Booksellers.t (-2 / +21 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 3;
20
use Test::More tests => 4;
21
21
22
use t::lib::TestBuilder;
22
use t::lib::TestBuilder;
23
23
Lines 172-174 subtest '->contacts() tests' => sub { Link Here
172
172
173
    $schema->storage->txn_rollback();
173
    $schema->storage->txn_rollback();
174
};
174
};
175
- 
175
176
subtest 'aliases' => sub {
177
178
    plan tests => 3;
179
180
    $schema->storage->txn_begin();
181
182
    my $vendor = $builder->build_object( { class => 'Koha::Acquisition::Booksellers' } );
183
184
    is( $vendor->aliases->count, 0, 'Vendor has no aliases' );
185
186
    $vendor->aliases( [ { alias => 'alias 1' }, { alias => 'alias 2' } ] );
187
188
    $vendor = $vendor->get_from_storage;
189
    my $aliases = $vendor->aliases;
190
    is( $aliases->count, 2 );
191
    is( ref($aliases), 'Koha::Acquisition::Bookseller::Aliases', 'Type is correct' );
192
193
    $schema->storage->txn_rollback();
194
};

Return to bug 33103