Bugzilla – Attachment 143985 Details for
Bug 32240
api/erm_users.t fails if checkouts exist
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32240: Prevent erm_users.t to fail if checkout exist
Bug-32240-Prevent-ermuserst-to-fail-if-checkout-ex.patch (text/plain), 1.62 KB, created by
Jonathan Druart
on 2022-11-17 08:53:32 UTC
(
hide
)
Description:
Bug 32240: Prevent erm_users.t to fail if checkout exist
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-11-17 08:53:32 UTC
Size:
1.62 KB
patch
obsolete
>From 7d101ac12f56e5b7e0ace9f333b8f4c0585e673a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 17 Nov 2022 09:51:42 +0100 >Subject: [PATCH] Bug 32240: Prevent erm_users.t to fail if checkout exist > >We should not (never) remove all patrons before tests > >Test plan: >0. Don't apply the patch >1. Check an item out >2. Run the tests >=> Fail >3. Apply the patch >4. Create a patron with the erm permission >5. Run the tests >=> Must return green >--- > t/db_dependent/api/v1/erm_users.t | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/api/v1/erm_users.t b/t/db_dependent/api/v1/erm_users.t >index 1e2ac643796..fff58cbe9dd 100755 >--- a/t/db_dependent/api/v1/erm_users.t >+++ b/t/db_dependent/api/v1/erm_users.t >@@ -38,7 +38,8 @@ subtest 'list() tests' => sub { > > $schema->storage->txn_begin; > >- Koha::Patrons->search->delete; >+ Koha::Patrons->search->update( { flags => 0 } ); >+ $schema->resultset('UserPermission')->delete; > > my $librarian = $builder->build_object( > { >@@ -51,8 +52,6 @@ subtest 'list() tests' => sub { > $librarian->set_password( { password => $password, skip_validation => 1 } ); > my $userid = $librarian->userid; > >- >- > ## Authorized user tests > # One erm_user created, should get returned > $librarian->discard_changes; >@@ -85,6 +84,7 @@ subtest 'list() tests' => sub { > > $patron->set_password( { password => $password, skip_validation => 1 } ); > my $unauth_userid = $patron->userid; >+ > # Unauthorized access > $t->get_ok("//$unauth_userid:$password@/api/v1/erm/users")->status_is(403); > >-- >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 32240
:
143985
|
144005