Bugzilla – Attachment 127531 Details for
Bug 26636
Add objects.find Mojolicious helper
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26636: Regression tests for undef case [20.11.x]
Bug-26636-Regression-tests-for-undef-case-2011x.patch (text/plain), 1.46 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-11-11 11:34:42 UTC
(
hide
)
Description:
Bug 26636: Regression tests for undef case [20.11.x]
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-11-11 11:34:42 UTC
Size:
1.46 KB
patch
obsolete
>From e64f0b3e30d6d2af245332d4ab8ce6025683c62d Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 2 Feb 2021 16:28:07 -0300 >Subject: [PATCH] Bug 26636: Regression tests for undef case [20.11.x] > >This patch adds tests for the case in which there's no object identified >by the supplied $id. It should return undef. > >Sponsored-by: Virginia Polytechnic Institute and State University > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/Koha/REST/Plugin/Objects.t | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/REST/Plugin/Objects.t b/t/db_dependent/Koha/REST/Plugin/Objects.t >index 6155e58f57..0324fa4720 100755 >--- a/t/db_dependent/Koha/REST/Plugin/Objects.t >+++ b/t/db_dependent/Koha/REST/Plugin/Objects.t >@@ -481,7 +481,7 @@ subtest 'object.search helper order by embedded columns' => sub { > > subtest 'objects.find helper' => sub { > >- plan tests => 6; >+ plan tests => 9; > > my $t = Test::Mojo->new; > >@@ -498,6 +498,13 @@ subtest 'objects.find helper' => sub { > ->status_is(200) > ->json_is( $city_2->to_api ); > >+ # Remove the city >+ my $city_2_id = $city_2->id; >+ $city_2->delete; >+ $t->get_ok( '/cities/' . $city_2_id ) >+ ->status_is(200) >+ ->json_is( undef ); >+ > $schema->storage->txn_rollback; > }; > >-- >2.33.1
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 26636
:
111418
|
111419
|
116222
|
116223
|
116224
|
116225
|
116226
|
116227
|
116228
|
116229
|
116230
|
116231
|
116594
|
116595
|
116596
|
116597
|
116598
|
117669
|
117670
|
117671
|
117672
|
117673
|
127528
|
127529
|
127530
| 127531 |
127532