Bugzilla – Attachment 155418 Details for
Bug 33960
Add ability to retrieve deleted bibliographic records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33960: Unit tests
Bug-33960-Unit-tests.patch (text/plain), 2.29 KB, created by
Katrin Fischer
on 2023-09-08 13:50:49 UTC
(
hide
)
Description:
Bug 33960: Unit tests
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-09-08 13:50:49 UTC
Size:
2.29 KB
patch
obsolete
>From 677ab607c1bd35e2bbf759a9bb174e9c9bfbd187 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 8 Jun 2023 13:57:45 +0000 >Subject: [PATCH] Bug 33960: Unit tests > >--- > t/db_dependent/api/v1/biblios.t | 33 +++++++++++++++++++++++++++++++-- > 1 file changed, 31 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/api/v1/biblios.t b/t/db_dependent/api/v1/biblios.t >index 53aeaaaa94..e240d009b7 100755 >--- a/t/db_dependent/api/v1/biblios.t >+++ b/t/db_dependent/api/v1/biblios.t >@@ -1626,7 +1626,7 @@ subtest 'put() tests' => sub { > > subtest 'list() tests' => sub { > >- plan tests => 17; >+ plan tests => 28; > > $schema->storage->txn_begin; > >@@ -1658,7 +1658,8 @@ subtest 'list() tests' => sub { > my $biblio_id_1 = $biblio->id; > > t::lib::Mocks::mock_preference('marcflavour', 'MARC21'); >- my $biblio_id_2 = $builder->build_sample_biblio->id; >+ my $biblio2 = $builder->build_sample_biblio; >+ my $biblio_id_2 = $biblio2->id; > > my $query = encode_json( [ { biblio_id => $biblio_id_1 }, { biblio_id => $biblio_id_2 } ] ); > >@@ -1695,6 +1696,34 @@ subtest 'list() tests' => sub { > { Accept => 'text/plain' } ) > ->status_is(200); > >+ $biblio->delete; >+ $biblio2->delete; >+ >+ $t->get_ok( "//$userid:$password@/api/v1/biblios/?deleted=1" => >+ { Accept => 'application/json', 'x-koha-query' => $search } ) >+ ->status_is(200); >+ >+ $result = $t->get_ok( "//$userid:$password@/api/v1/biblios/?deleted=1" => >+ { Accept => 'application/marcxml+xml', 'x-koha-query' => $search } ) >+ ->status_is(200)->tx->res->body; >+ >+ $encoded_title = Encode::encode( "UTF-8", $title_with_diacritics ); >+ like( $result, qr/\Q$encoded_title/, "The title is not double encoded" ); >+ >+ $t->get_ok( "//$userid:$password@/api/v1/biblios/?deleted=1" => >+ { Accept => 'application/marc-in-json', 'x-koha-query' => $search } ) >+ ->status_is(200); >+ >+ $t->get_ok( "//$userid:$password@/api/v1/biblios/?deleted=1" => >+ { Accept => 'application/marc', 'x-koha-query' => $search } ) >+ ->status_is(200); >+ >+ $t->get_ok( "//$userid:$password@/api/v1/biblios/?deleted=1" => >+ { Accept => 'text/plain', 'x-koha-query' => $search } ) >+ ->status_is(200); >+ >+ >+ > $schema->storage->txn_rollback; > }; > >-- >2.30.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 33960
:
152199
|
152200
|
152201
|
152215
|
155331
|
155332
|
155333
|
155334
|
155335
|
155416
|
155417
|
155418
|
155419
|
155420
|
157899
|
157900
|
157901
|
157902
|
157903
|
157904
|
158071
|
159998
|
159999
|
160000
|
160001
|
160002
|
160552
|
163852
|
163853
|
163854
|
163855
|
163948
|
163949
|
163950
|
163951