Bugzilla – Attachment 113818 Details for
Bug 26984
Tests are failing if AnonymousPatron is configured
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26984: (follow-up) Don't delete patrons and checkouts in Objects.t
Bug-26984-follow-up-Dont-delete-patrons-and-checko.patch (text/plain), 1.46 KB, created by
Tomás Cohen Arazi
on 2020-11-19 14:24:17 UTC
(
hide
)
Description:
Bug 26984: (follow-up) Don't delete patrons and checkouts in Objects.t
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2020-11-19 14:24:17 UTC
Size:
1.46 KB
patch
obsolete
>From bf7e4e347c4f9098cbb31693a8e9d10a9ccaa39b Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 17 Nov 2020 12:11:21 +0000 >Subject: [PATCH] Bug 26984: (follow-up) Don't delete patrons and checkouts in > Objects.t > >Rather than counting all and assuriing we get 10, we can count all, add 10, and ensure the numbers still match > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/Koha/Objects.t | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > >diff --git a/t/db_dependent/Koha/Objects.t b/t/db_dependent/Koha/Objects.t >index 19574f6c813..afb00ee142e 100755 >--- a/t/db_dependent/Koha/Objects.t >+++ b/t/db_dependent/Koha/Objects.t >@@ -262,18 +262,16 @@ subtest '->is_paged and ->pager tests' => sub { > > $schema->storage->txn_begin; > >- # Delete existing patrons >- t::lib::Mocks::mock_preference('AnonymousPatron', ''); >- Koha::Checkouts->delete; >- Koha::Patrons->delete; >- # Create 10 patrons >+ # Count existing patrons >+ my $nb_patrons = Koha::Patrons->search()->count; >+ # Create 10 more patrons > foreach (1..10) { > $builder->build_object({ class => 'Koha::Patrons' }); > } > > # Non-paginated search > my $patrons = Koha::Patrons->search(); >- is( $patrons->count, 10, 'Search returns all patrons' ); >+ is( $patrons->count, $nb_patrons + 10, 'Search returns all patrons' ); > ok( !$patrons->is_paged, 'Search is not paged' ); > > # Paginated search >-- >2.29.2
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 26984
:
113547
|
113550
|
113551
|
113552
|
113662
|
113704
|
113817
| 113818