Bugzilla – Attachment 147653 Details for
Bug 33103
Add vendor aliases
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33103: Add REST API tests
Bug-33103-Add-REST-API-tests.patch (text/plain), 1.61 KB, created by
PTFS Europe Sandboxes
on 2023-03-02 16:12:50 UTC
(
hide
)
Description:
Bug 33103: Add REST API tests
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2023-03-02 16:12:50 UTC
Size:
1.61 KB
patch
obsolete
>From cf67b11489a4547a9bf823f8848ab2c9e4cce01f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 2 Mar 2023 14:08:29 +0100 >Subject: [PATCH] Bug 33103: Add REST API tests > >Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> >--- > t/db_dependent/api/v1/acquisitions_vendors.t | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/api/v1/acquisitions_vendors.t b/t/db_dependent/api/v1/acquisitions_vendors.t >index 6f74fff7ef..f9520d886e 100755 >--- a/t/db_dependent/api/v1/acquisitions_vendors.t >+++ b/t/db_dependent/api/v1/acquisitions_vendors.t >@@ -36,7 +36,7 @@ my $t = Test::Mojo->new('Koha::REST::V1'); > > subtest 'list() and delete() tests | authorized user' => sub { > >- plan tests => 35; >+ plan tests => 40; > > $schema->storage->txn_begin; > >@@ -91,6 +91,15 @@ subtest 'list() and delete() tests | authorized user' => sub { > ->status_is(200) > ->json_like( '/0/name' => qr/Amerindia/ ); > >+ my @aliases = ( { alias => 'alias 1' }, { alias => 'alias 2' } ); >+ $vendor->aliases( \@aliases ); >+ $t->get_ok( "//$userid:$password@/api/v1/acquisitions/vendors" => >+ { 'x-koha-embed' => 'aliases' } ) >+ ->status_is(200) >+ ->json_has('/0/aliases', 'aliases are embeded') >+ ->json_is('/0/aliases/0/alias' => 'alias 1', 'alias 1 is embeded') >+ ->json_is('/0/aliases/1/alias' => 'alias 2', 'alias 2 is embeded'); >+ > $t->delete_ok( "//$userid:$password@/api/v1/acquisitions/vendors/" . $vendor->id ) > ->status_is(204, 'SWAGGER3.2.4') > ->content_is('', 'SWAGGER3.3.4'); >-- >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 33103
:
147621
|
147622
|
147623
|
147624
|
147625
|
147626
|
147627
|
147628
|
147629
|
147630
|
147645
|
147646
|
147647
|
147648
|
147649
|
147650
|
147651
|
147652
|
147653
|
147654
|
147827
|
148448
|
148449
|
148450
|
148451
|
148452
|
148453
|
148454
|
148455
|
148456
|
148457
|
148458
|
149414
|
149419
|
149479
|
149480
|
149481
|
149482
|
149483
|
149484
|
149485
|
149486
|
149487
|
149488
|
149489
|
149490
|
149491
|
149606
|
149607
|
149608
|
149609
|
149629
|
149630
|
149788