[Koha-bugs] [Bug 26984] Tests are failing if AnonymousPatron is configured

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Nov 17 13:44:35 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26984

--- Comment #14 from Nick Clemens <nick at bywatersolutions.com> ---
(In reply to Jonathan Druart from comment #13)
> (In reply to Nick Clemens from comment #12)
> > Created attachment 113704 [details] [review] [review]
> > 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
> 
> We want 10 and only 10 patrons, we don't want pagination:
> 
>   my $patrons = Koha::Patrons->search();
>   is( $patrons->count, 10, 'Search returns all patrons' );
>   ok( !$patrons->is_paged, 'Search is not paged' );
> 
> I haven't tried, but I am expecting your patch to make the tests fail if
> there are existing patrons in the DB. Don't they? If so the test is buggy
> I'd say...

As I understand, the resultset shouldn't be paged unless we asked for it to be
paged, I don't believe it happens automatically:
https://metacpan.org/pod/DBIx::Class::ResultSet#page
https://metacpan.org/pod/DBIx::Class::ResultSet#is_paged

I don't believe we have any reason to need strictly 10 patrons

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list