Bugzilla – Attachment 87060 Details for
Bug 22577
Cronjobs (and other scripts) should be attributed to a 'real' user
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22577: Add test for Koha::Patrons->search
Bug-22577-Add-test-for-KohaPatrons-search.patch (text/plain), 1.46 KB, created by
Martin Renvoize (ashimema)
on 2019-03-27 10:31:38 UTC
(
hide
)
Description:
Bug 22577: Add test for Koha::Patrons->search
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-03-27 10:31:38 UTC
Size:
1.46 KB
patch
obsolete
>From 457c4bf13613801a8652ff7f2a2a2a2123fd7e01 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 27 Mar 2019 09:31:59 +0000 >Subject: [PATCH] Bug 22577: Add test for Koha::Patrons->search > >--- > t/db_dependent/Koha/Patrons.t | 16 +++++++++++++--- > 1 file changed, 13 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t >index a0a46ec2eb..8cff118472 100644 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -19,7 +19,7 @@ > > use Modern::Perl; > >-use Test::More tests => 33; >+use Test::More tests => 34; > use Test::Warn; > use Test::Exception; > use Test::MockModule; >@@ -368,8 +368,18 @@ subtest "move_to_deleted" => sub { > $retrieved_patron->delete( $patron->{borrowernumber} ); # Cleanup > }; > >-subtest "delete" => sub { >- plan tests => 5; >+subtest "Koha::Patrons->search" => sub { >+ plan tests => 1; >+ >+ my $set = Koha::Patrons->search(); >+ my $count = $set->count; >+ my $reduced_set = $set->search({ borrowernumber => { '>' => 0 } }); >+ my $reduced_count = $reduced_set->count; >+ is ( $count, $reduced_count, "System users not found in Koha::Patrons->search"); >+}; >+ >+subtest "Koha::Patron->delete" => sub { >+ plan tests => 6; > t::lib::Mocks::mock_preference( 'BorrowersLog', 1 ); > my $patron = $builder->build( { source => 'Borrower' } ); > my $retrieved_patron = Koha::Patrons->find( $patron->{borrowernumber} ); >-- >2.20.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 22577
:
86991
|
86992
|
86993
|
87007
|
87008
|
87013
|
87014
|
87015
|
87017
|
87028
|
87029
|
87030
|
87031
|
87032
|
87053
|
87054
|
87055
|
87056
|
87057
|
87058
|
87059
| 87060