Bugzilla – Attachment 164931 Details for
Bug 36482
Make it possible to embed desks and cash_registers on /libraries
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36482: Add embed tests
Bug-36482-Add-embed-tests.patch (text/plain), 1.77 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-04-16 12:59:22 UTC
(
hide
)
Description:
Bug 36482: Add embed tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-04-16 12:59:22 UTC
Size:
1.77 KB
patch
obsolete
>From 1746db472869f598463c185be64b176e791ca724 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 4 Apr 2024 11:14:11 +0000 >Subject: [PATCH] Bug 36482: Add embed tests > >prove t/db_dependent/api/v1/libraries.t > >Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> >--- > t/db_dependent/api/v1/libraries.t | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/api/v1/libraries.t b/t/db_dependent/api/v1/libraries.t >index e285bb1d99c..4ecb26c2436 100755 >--- a/t/db_dependent/api/v1/libraries.t >+++ b/t/db_dependent/api/v1/libraries.t >@@ -111,7 +111,7 @@ subtest 'list() tests' => sub { > > subtest 'get() tests' => sub { > >- plan tests => 6; >+ plan tests => 12; > > $schema->storage->txn_begin; > >@@ -128,6 +128,19 @@ subtest 'get() tests' => sub { > ->status_is( 200, 'SWAGGER3.2.2' ) > ->json_is( '' => $library->to_api, 'SWAGGER3.3.2' ); > >+ $t->get_ok( "//$userid:$password@/api/v1/libraries/" >+ . $library->branchcode => { 'x-koha-embed' => 'cash_registers,desks' } )->status_is(200) >+ ->json_is( { %{ $library->to_api }, desks => [], cash_registers => [] } ); >+ >+ my $desk = $builder->build_object( { class => 'Koha::Desks', value => { branchcode => $library->id } } ); >+ my $cash_register = >+ $builder->build_object( { class => 'Koha::Cash::Registers', value => { branch => $library->id } } ); >+ >+ $t->get_ok( "//$userid:$password@/api/v1/libraries/" >+ . $library->branchcode => { 'x-koha-embed' => 'cash_registers,desks' } )->status_is(200) >+ ->json_is( >+ { %{ $library->to_api }, desks => [ $desk->to_api ], cash_registers => [ $cash_register->to_api ] } ); >+ > my $non_existent_code = $library->branchcode; > $library->delete; > >-- >2.44.0
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 36482
:
164229
|
164230
|
164304
|
164305
|
164416
|
164417
|
164418
|
164929
|
164930
| 164931