[Koha-bugs] [Bug 17656] Irregularities in serial prediction pattern are planned only for current subscription

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 15 10:40:12 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17656

--- Comment #138 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
+my $subscription_o =
Koha::Subscriptions->find($subscription->{subscriptionid});
+my @irreg = $subscription_o->irregularities;
+is($irreg[0], 2, 'First element of irregularities is 2');
+is($irreg[1], 4, 'Second element of irregularities is 4');
+is($irreg[2], 7, 'Third element of irregularities is 7');
+
+my @permanent_irreg = $subscription_o->permanent_irregularities;
+is($permanent_irreg[0], 1, 'First element of permanent_irregularities is 1');
+is($permanent_irreg[1], 2, 'Second element of permanent_irregularities is 2');

Do we really need this?
You add a separate script here to test if split /;/  works ?
I appreciate your willingness to test, but I have the impression that we should
focus here on complex exceptions with various frequencies, different months,
leap years, etc. Think of various date peculiarities.

Elaborating on that, t/db_dependent/Koha/Subscription/Irregularities.t contains
a lot of code, but actually only one test.
+ is($irregularities, '10;11', 'Irregularities have been updated');
Since this looks like the most important test, I would really expect more
testing here. Maybe you should think of some intelligent mocks here to reduce a
lot of building calls?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list