[Koha-bugs] [Bug 9426] Add itemtype description template plugin
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Sat Mar 16 16:10:13 CET 2013
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9426
Jared Camins-Esakov <jcamins at cpbibliography.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|Passed QA |Failed QA
--- Comment #10 from Jared Camins-Esakov <jcamins at cpbibliography.com> ---
This patch looks good, except it doesn't add unit tests for the new code in C4/
and Koha/.
What about something like this in t/ItemType.t (obviously a resultset will have
to be added to the mocked dbh before this test):
my $itype = C4::ItemType->new_from_code('BK');
is(ref $itype, 'C4::ItemType', 'new_from_code creates correct type of object');
is($itype->description, 'Books', 'new_from_code retrieved correct itemtype');
And, of course, there also need to be tests for
Koha::Template::Plugin::ItemType. If you look at
t/db_dependent/Koha_template_plugin_KohaDates.t you'll see an example of a unit
test for a TT filter (and bonus points if you test by way of C4::Template as
well).
A follow-up adding the unit tests need not go through the entire sign off/QA
process again. If the coverage is good (and the tests pass), I will review it
myself and push it, so you can set this bug back to "Passed QA" after your
follow-up is attached.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list