Bug 30204: Add unit test

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Kyle M Hall 2022-04-05 12:54:37 -04:00
parent 61f8d8ef65
commit e682ac96c8
1 changed files with 6 additions and 2 deletions

View File

@ -58,7 +58,7 @@ subtest '->baskets() tests' => sub {
subtest '->subscriptions() tests' => sub {
plan tests => 5;
plan tests => 6;
$schema->storage->txn_begin();
@ -91,7 +91,7 @@ subtest '->subscriptions() tests' => sub {
);
my $bib = MARC::Record->new();
$bib->append_fields(
MARC::Field->new( '245', ' ', ' ', a => 'Journal of ethnology' ),
MARC::Field->new( '245', ' ', ' ', a => 'Journal of ethnology', b => 'A subtitle' ),
MARC::Field->new( '500', ' ', ' ', a => 'bib notes' ),
);
my ( $biblionumber, $biblioitemnumber ) = AddBiblio( $bib, '' );
@ -114,6 +114,10 @@ subtest '->subscriptions() tests' => sub {
'subscription notes',
'subscription search results include public notes (bug 10689)'
);
is( $subscriptions[0]->{subtitle},
'A subtitle',
'subscription search results include subtitle (bug 30204)'
);
my $id_subscription2 = NewSubscription(
undef, 'BRANCH2', $vendor->id, undef,