Bugzilla – Attachment 96914 Details for
Bug 24366
Merging biblioitems should happen in Koha::Biblio->to_api
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24366: Unit tests
Bug-24366-Unit-tests.patch (text/plain), 1.18 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-01-07 17:46:05 UTC
(
hide
)
Description:
Bug 24366: Unit tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-01-07 17:46:05 UTC
Size:
1.18 KB
patch
obsolete
>From f869b0026883a8cb49b1da9222fa6de842cb6dba Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 7 Jan 2020 14:45:41 -0300 >Subject: [PATCH] Bug 24366: Unit tests > >--- > t/db_dependent/Koha/Biblio.t | 19 ++++++++++++++++++- > 1 file changed, 18 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Biblio.t b/t/db_dependent/Koha/Biblio.t >index 06a5b40a52..45b375b369 100644 >--- a/t/db_dependent/Koha/Biblio.t >+++ b/t/db_dependent/Koha/Biblio.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 8; >+use Test::More tests => 9; > > use C4::Biblio; > use Koha::Database; >@@ -434,3 +434,20 @@ subtest 'pickup_locations' => sub { > > $schema->storage->txn_rollback; > }; >+ >+subtest 'to_api() tests' => sub { >+ >+ $schema->storage->txn_begin; >+ >+ my $biblio = $builder->build_sample_biblio(); >+ my $biblioitem_api = $biblio->biblioitem->to_api; >+ my $biblio_api = $biblio->to_api; >+ >+ plan tests => scalar keys %{ $biblioitem_api }; >+ >+ foreach my $key ( keys %{ $biblioitem_api } ) { >+ is( $biblio_api->{$key}, $biblioitem_api->{$key}, "$key is added to the biblio object" ); >+ } >+ >+ $schema->storage->txn_rollback; >+}; >-- >2.24.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24366
:
96914
|
96915
|
96958
|
96959
|
97312
|
97313
|
97314
|
97332