Bugzilla – Attachment 106283 Details for
Bug 25875
Patron displayed multiple times in add user search if they have multiple sub permissions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25875: Unit test
Bug-25875-Unit-test.patch (text/plain), 1.62 KB, created by
Nick Clemens (kidclamp)
on 2020-06-25 10:40:14 UTC
(
hide
)
Description:
Bug 25875: Unit test
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-06-25 10:40:14 UTC
Size:
1.62 KB
patch
obsolete
>From 8f24268aa8f22b45ac869567c8be9c51bbc1c713 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 25 Jun 2020 10:38:16 +0000 >Subject: [PATCH] Bug 25875: Unit test > >--- > t/db_dependent/Utils/Datatables_Members.t | 22 +++++++++++++++++++++- > 1 file changed, 21 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Utils/Datatables_Members.t b/t/db_dependent/Utils/Datatables_Members.t >index e0632c4a2f..781b02384a 100644 >--- a/t/db_dependent/Utils/Datatables_Members.t >+++ b/t/db_dependent/Utils/Datatables_Members.t >@@ -501,7 +501,7 @@ subtest 'Search by any borrowers field (bug 17374)' => sub { > }; > > subtest 'Search with permissions' => sub { >- plan tests => 2; >+ plan tests => 4; > > my $superlibrarian = $builder->build_object( > { >@@ -549,6 +549,26 @@ subtest 'Search with permissions' => sub { > ], > 'We got the 3 patrons we expected' > ); >+ >+ C4::Context->dbh->do( >+ q|INSERT INTO user_permissions(borrowernumber, module_bit, code) VALUES(?,?,?)|, >+ undef, >+ $librarian_with_subpermission->borrowernumber, >+ 1, >+ 'force_checkout' >+ ); >+ is( $search_results->{iTotalDisplayRecords}, >+ 3, "We find 3 patrons with suggestions_manage permission" ); >+ is_deeply( >+ [ sort map { $_->{borrowernumber} } @{ $search_results->{patrons} } ], >+ [ >+ $superlibrarian->borrowernumber, >+ $librarian_with_full_permission->borrowernumber, >+ $librarian_with_subpermission->borrowernumber >+ ], >+ 'We got the 3 patrons we expected' >+ ); >+ > }; > > subtest 'return values' => sub { >-- >2.11.0
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 25875
:
106283
|
106284
|
106285
|
106286
|
106341
|
106363
|
106364