Bugzilla – Attachment 144188 Details for
Bug 31381
Searching patrons by letter broken when using non-mandatory extended attributes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31381: Add tests
Bug-31381-Add-tests.patch (text/plain), 1.80 KB, created by
Jonathan Druart
on 2022-11-23 08:30:56 UTC
(
hide
)
Description:
Bug 31381: Add tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-11-23 08:30:56 UTC
Size:
1.80 KB
patch
obsolete
>From 6f0ee721e461b1d06ef32fb0ed71080564044b9b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 23 Nov 2022 09:30:33 +0100 >Subject: [PATCH] Bug 31381: Add tests > >--- > .../api/v1/patrons_extended_attributes.t | 26 ++++++++++++++++++- > 1 file changed, 25 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/api/v1/patrons_extended_attributes.t b/t/db_dependent/api/v1/patrons_extended_attributes.t >index 1766576fcb4..278631fb339 100755 >--- a/t/db_dependent/api/v1/patrons_extended_attributes.t >+++ b/t/db_dependent/api/v1/patrons_extended_attributes.t >@@ -34,7 +34,7 @@ t::lib::Mocks::mock_preference( 'RESTBasicAuth', 1 ); > > subtest 'list_patron_attributes() tests' => sub { > >- plan tests => 9; >+ plan tests => 10; > > $schema->storage->txn_begin; > >@@ -68,6 +68,30 @@ subtest 'list_patron_attributes() tests' => sub { > ->status_is( 404 ) > ->json_is( '/error' => 'Patron not found' ); > >+ subtest 'nullable value' => sub { >+ # FIXME This is not correct, we should remove the NULLABLE clause at the DBMS level >+ # This test will need to be adjusted on bug 32331 >+ plan tests => 3; >+ >+ my $user = $builder->build_object({class => 'Koha::Patrons'}); >+ >+ $builder->build_object( >+ { >+ class => 'Koha::Patron::Attributes', >+ value => { borrowernumber => $user->id, attribute => undef } >+ } >+ ); >+ >+ $t->get_ok( "//$userid:$password@/api/v1/patrons/" >+ . $user->id >+ . '/extended_attributes' )->status_is( 200, 'SWAGGER3.2.2' ) >+ ->json_is( >+ '' => $user->extended_attributes->to_api, >+ 'Extended attributes retrieved correctly' >+ ); >+ >+ }; >+ > $schema->storage->txn_rollback; > }; > >-- >2.25.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 31381
:
144173
|
144188
|
144196
|
144197
|
144351
|
144352