Bugzilla – Attachment 165269 Details for
Bug 36612
The public tickets endpoint needs public fields list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36612: Unit test for public ticket add
Bug-36612-Unit-test-for-public-ticket-add.patch (text/plain), 1.58 KB, created by
David Nind
on 2024-04-22 11:40:47 UTC
(
hide
)
Description:
Bug 36612: Unit test for public ticket add
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-04-22 11:40:47 UTC
Size:
1.58 KB
patch
obsolete
>From 52995e12a50a74420e9737f53785cbf8728691af Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 16 Apr 2024 18:49:19 +0100 >Subject: [PATCH] Bug 36612: Unit test for public ticket add > >Signed-off-by: David Nind <david@davidnind.com> >--- > t/db_dependent/api/v1/tickets.t | 21 ++++++++++++++++++++- > 1 file changed, 20 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/api/v1/tickets.t b/t/db_dependent/api/v1/tickets.t >index 788d32a252..e77a20e8a8 100755 >--- a/t/db_dependent/api/v1/tickets.t >+++ b/t/db_dependent/api/v1/tickets.t >@@ -146,7 +146,7 @@ subtest 'get() tests' => sub { > > subtest 'add() tests' => sub { > >- plan tests => 21; >+ plan tests => 22; > > $schema->storage->txn_begin; > >@@ -244,6 +244,25 @@ subtest 'add() tests' => sub { > ] > ); > >+ subtest 'public add' => sub { >+ plan tests => 7; >+ >+ delete $ticket->{ticket_id}; >+ >+ my $useridp = $patron->userid; >+ $patron->set_password( { password => $password, skip_validation => 1 } ); >+ >+ $ticket_id = >+ $t->post_ok( "//$useridp:$password@/api/v1/public/tickets" => json => $ticket ) >+ ->status_is( 201, 'SWAGGER3.2.1' )->header_like( >+ Location => qr|^\/api\/v1\/public\/tickets/\d*|, >+ 'SWAGGER3.4.1' >+ )->json_is( '/biblio_id' => $ticket->{biblio_id} )->json_is( '/title' => $ticket->{title} ) >+ ->json_is( '/body' => $ticket->{body} )->json_is( '/reporter_id' => $patron->id ) >+ ->tx->res->json->{ticket_id}; >+ >+ }; >+ > $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 36612
:
164960
|
164961
|
165268
| 165269 |
165270
|
166261