Bug 31503: (QA follow-up) Improve count of available_types

Tidied one other line.

Test plan:
Run t/db_dependent/Koha/Patron/Consents.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Marcel de Rooy 2023-10-13 14:54:47 +00:00 committed by Tomas Cohen Arazi
parent 22651c9c2b
commit 685ac83fa4
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -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 = [];