Bugzilla – Attachment 128955 Details for
Bug 29736
Error when placing a hold for a club without members
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29736: (QA follow-up) No need to delete all clubs
Bug-29736-QA-follow-up-No-need-to-delete-all-clubs.patch (text/plain), 1.75 KB, created by
Katrin Fischer
on 2022-01-02 16:36:58 UTC
(
hide
)
Description:
Bug 29736: (QA follow-up) No need to delete all clubs
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2022-01-02 16:36:58 UTC
Size:
1.75 KB
patch
obsolete
>From b80599df98cc6e643b3e5a68e6532cc4559bda79 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 21 Dec 2021 10:16:55 -0300 >Subject: [PATCH] Bug 29736: (QA follow-up) No need to delete all clubs > >There's no real need to delete all the existing clubs in the tests. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/Clubs.t | 16 ++++++++++------ > 1 file changed, 10 insertions(+), 6 deletions(-) > >diff --git a/t/db_dependent/Clubs.t b/t/db_dependent/Clubs.t >index 8d8a0d1951..853c988f8a 100755 >--- a/t/db_dependent/Clubs.t >+++ b/t/db_dependent/Clubs.t >@@ -233,11 +233,10 @@ is( $club->club_enrollments->count, 1, 'There is 1 enrollment for club' ); > $schema->storage->txn_rollback(); > > subtest 'filter_out_empty' => sub { >- plan tests => 2; > >- $schema->storage->txn_begin(); >+ plan tests => 3; > >- Koha::Clubs->delete; >+ $schema->storage->txn_begin(); > > my $club_template = $builder->build_object({ class => 'Koha::Club::Templates' }); > >@@ -293,9 +292,14 @@ subtest 'filter_out_empty' => sub { > > $enrollment_2_1->cancel; > >- my $clubs = Koha::Clubs->search->filter_out_empty; >- is( $clubs->count, 1, 'Only one club has patron enrolled' ); >- is( $clubs->next->id, $club_1->id, 'Correct club is considered non-empty'); >+ my $clubs = Koha::Clubs->search({ club_template_id => $club_template->id }); >+ >+ is( $clubs->count, 3, 'Base resultset has all the clubs' ); >+ >+ my $filtered_out_rs = $clubs->filter_out_empty; >+ >+ is( $filtered_out_rs->count, 1, 'Only one club has patron enrolled' ); >+ is( $filtered_out_rs->next->id, $club_1->id, 'Correct club is considered non-empty'); > > $schema->storage->txn_rollback(); > } >-- >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 29736
:
128760
|
128836
|
128837
|
128838
|
128953
|
128954
| 128955