Bugzilla – Attachment 166150 Details for
Bug 36618
Make creation of bibliographic records optional for ERM local titles
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36618: Add unit tests
Bug-36618-Add-unit-tests.patch (text/plain), 2.18 KB, created by
Clemens Tubach
on 2024-05-03 15:18:36 UTC
(
hide
)
Description:
Bug 36618: Add unit tests
Filename:
MIME Type:
Creator:
Clemens Tubach
Created:
2024-05-03 15:18:36 UTC
Size:
2.18 KB
patch
obsolete
>From 5c96cfd9daf13643e83667cebe8277af87f61f1f Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Wed, 17 Apr 2024 10:34:49 +0000 >Subject: [PATCH] Bug 36618: Add unit tests > >prove t/db_dependent/api/v1/erm_eholdings_titles.t > >Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu> >--- > t/db_dependent/api/v1/erm_eholdings_titles.t | 20 ++++++++++++++++++-- > 1 file changed, 18 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/api/v1/erm_eholdings_titles.t b/t/db_dependent/api/v1/erm_eholdings_titles.t >index 2c7802f1c1..e34b8a6c47 100755 >--- a/t/db_dependent/api/v1/erm_eholdings_titles.t >+++ b/t/db_dependent/api/v1/erm_eholdings_titles.t >@@ -192,7 +192,7 @@ subtest 'get() tests' => sub { > > subtest 'add() tests' => sub { > >- plan tests => 24; >+ plan tests => 25; > > $schema->storage->txn_begin; > >@@ -331,6 +331,22 @@ subtest 'add() tests' => sub { > ] > ); > >+ subtest 'add eholdings title linked to biblio tests' => sub { >+ >+ plan tests => 4; >+ >+ delete $ehtitle->{title_id}; >+ my $request_body = { >+ %{$ehtitle}, >+ }; >+ $request_body->{create_linked_biblio} = 1; >+ my $biblios_count = Koha::Biblios->search()->count; >+ $t->post_ok( "//$userid:$password@/api/v1/erm/eholdings/local/titles/" => json => $request_body ) >+ ->status_is(201)->json_is( '/publication_title' => 'Publication title' ); >+ my $new_biblios_count = Koha::Biblios->search()->count; >+ is( $new_biblios_count, $biblios_count + 1, "Biblio was added" ); >+ }; >+ > $schema->storage->txn_rollback; > }; > >@@ -472,7 +488,7 @@ subtest 'update() tests' => sub { > my $ehtitle_updated_title = { publication_title => "The journal of writing unit tests :" }; > > $t->put_ok( >- "//$userid:$password@/api/v1/erm/eholdings/local/titles/$ehtitle_id" => json => $ehtitle_updated_title ) >+ "//$userid:$password@/api/v1/erm/eholdings/local/titles/$ehtitle_id" => json => { %$ehtitle_updated_title, create_linked_biblio => 1 } ) > ->status_is(200)->json_is( '/publication_title' => 'The journal of writing unit tests :' ); > > $biblio->discard_changes; >-- >2.39.2
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 36618
:
164992
|
164993
|
166149
|
166150
|
166380
|
166381
|
166382
|
166386
|
166387
|
166388
|
167111