Bugzilla – Attachment 173873 Details for
Bug 38322
Wrong comment in t/db_dependent/api/v1/erm_users.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38322: Adust tests
Bug-38322-Adust-tests.patch (text/plain), 1.70 KB, created by
Nick Clemens (kidclamp)
on 2024-11-01 12:54:27 UTC
(
hide
)
Description:
Bug 38322: Adust tests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-11-01 12:54:27 UTC
Size:
1.70 KB
patch
obsolete
>From 8d553e0a8bcc0e81db156b8ccfe90341b7d995ae Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 1 Nov 2024 12:54:09 +0000 >Subject: [PATCH] Bug 38322: Adust tests > >--- > t/db_dependent/api/v1/erm_users.t | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/api/v1/erm_users.t b/t/db_dependent/api/v1/erm_users.t >index f0381053847..ad60b1b2aae 100755 >--- a/t/db_dependent/api/v1/erm_users.t >+++ b/t/db_dependent/api/v1/erm_users.t >@@ -35,7 +35,7 @@ t::lib::Mocks::mock_preference( 'ChildNeedsGuarantor', 0 ); > > subtest 'list() tests' => sub { > >- plan tests => 11; >+ plan tests => 14; > > $schema->storage->txn_begin; > >@@ -70,10 +70,21 @@ subtest 'list() tests' => sub { > } > ); > >- # Two erm_users created, they should both be returned >+ # Two erm_users created, onyl self is returned without permission to view_any_borrower > $t->get_ok("//$userid:$password@/api/v1/erm/users")->status_is(200) > ->json_is( [ $librarian->to_api( { user => $librarian } ) ] ); > >+ my $dbh = C4::Context->dbh; >+ $dbh->do( >+ q{INSERT INTO user_permissions( borrowernumber, module_bit, code ) VALUES (?, ?, ?)}, undef, >+ ( $librarian->borrowernumber, 4, 'view_borrower_infos_from_any_libraries' ) >+ ); >+ >+ # Two erm_users created, they should both be returned >+ $t->get_ok("//$userid:$password@/api/v1/erm/users")->status_is(200) >+ ->json_is( >+ [ $librarian->to_api( { user => $librarian } ), $another_erm_user->to_api( { user => $another_erm_user } ) ] ); >+ > # Warn on unsupported query parameter > $t->get_ok("//$userid:$password@/api/v1/erm/users?blah=blah") > ->status_is(400) >-- >2.39.5
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 38322
:
173873
|
174297
|
174450
|
174451