Bugzilla – Attachment 113704 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.40 KB, created by
Nick Clemens
on 2020-11-17 12:16:45 UTC
(
hide
)
Description:
Bug 26984: (follow-up) Don't delete patrons and checkouts in Objects.t
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2020-11-17 12:16:45 UTC
Size:
1.40 KB
patch
obsolete
>From f343e6c5259ba55def2a2fee00ec3f3b15f40482 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 >--- > 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 19574f6c81..afb00ee142 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.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 26984
:
113547
|
113550
|
113551
|
113552
|
113662
|
113704
|
113817
|
113818