From 5bdce929e4a04c6fddf140adb897f7956efdca27 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 13 Oct 2023 14:54:47 +0000 Subject: [PATCH] Bug 31503: (QA follow-up) Improve count of available_types Content-Type: text/plain; charset=utf-8 Tidied one other line. Test plan: Run t/db_dependent/Koha/Patron/Consents.t Signed-off-by: Marcel de Rooy --- t/db_dependent/Koha/Patron/Consents.t | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/t/db_dependent/Koha/Patron/Consents.t b/t/db_dependent/Koha/Patron/Consents.t index eeea426ab3..5120022797 100755 --- a/t/db_dependent/Koha/Patron/Consents.t +++ b/t/db_dependent/Koha/Patron/Consents.t @@ -54,9 +54,12 @@ subtest 'Method available_types' => sub { plan tests => 7; $schema->storage->txn_begin; - t::lib::Mocks::mock_preference( 'PrivacyPolicyConsent', 'Enforced' ); - my $types = Koha::Patron::Consents->available_types; - is( keys %$types, 1, 'Expect one type for privacy policy' ); + t::lib::Mocks::mock_preference( 'PrivacyPolicyConsent', q{} ); + my $types = Koha::Patron::Consents->available_types; + my $count_before = scalar keys %$types; + t::lib::Mocks::mock_preference( 'PrivacyPolicyConsent', 'Enforced' ); + $types = Koha::Patron::Consents->available_types; + is( keys %$types, $count_before + 1, 'Expect one type more for privacy policy' ); # Mock get_enabled_plugins my $plugins = []; -- 2.30.2