Bugzilla – Attachment 128838 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.70 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-12-21 13:56:55 UTC
(
hide
)
Description:
Bug 29736: (QA follow-up) No need to delete all clubs
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-12-21 13:56:55 UTC
Size:
1.70 KB
patch
obsolete
>From 5efe2d55eaf650043be28fea35fcc57564d4c9bb 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> >--- > 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.32.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