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:
parent
22651c9c2b
commit
685ac83fa4
1 changed files with 6 additions and 3 deletions
|
@ -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 = [];
|
||||
|
|
Loading…
Reference in a new issue