From 7c84ec7a8c22d2b4dd7f232d30c6de448ad5bc38 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Fri, 25 Aug 2017 01:29:46 +0000 Subject: [PATCH] Bug 18212 - Followup: Fixed POD in AuthorisedValue.pm and ItemType.pm Passes QA test now, and all unit tests pass Test plan: 1. Apply all the patches attached to this bug report 2. Restart memcached: sudo service memcached restart 3. Drop and recreate the Koha instance database 4. Go through the web installer, selecting all data to be installed in step 3 5. After the web installer is finished log in with the Koha database administrator credentials 6. Create yourself a patron account 7. Set the patron account to have superlibrarian privileges 8. Log out and back in as your newly created patron 9. Navigate to the Acquisitions interface 10. Create a budget named 'testbudget' 11. Create a fund named 'testfund' 12. Navigate to the 'Administrator' interface 13. Write in the URL 'cgi-bin/koha/admin/aqplan.pl' 14. There should be no records showing 15. If you click on Planning->Plan by Months testfund will be displayed 16. Repeat step 14 but click on Planning->Plan by libraries and Planning->Plan by Itemtypes, Both of these pages should also show 'testfund' 17. In your terminal navigate from your Koha instance root directory to t/db_dependent 18. Enter koha shell: sudo koha-shell 19. Run AuthorisedValues unit tests: prove -v AuthorisedValues.t 20. The tests should run successful 21. Exit the koha shell 22. cd into the 'koha' directory from where you are 23. Enter the koha shell and run the ItemTypes.t and Libraries.t unit tests by writing in: prove -v filename.t (both of which should be successful) Sponsored-by: Catalyst IT --- Koha/AuthorisedValue.pm | 4 ++++ Koha/ItemType.pm | 2 ++ t/db_dependent/Koha/ItemTypes.t | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Koha/AuthorisedValue.pm b/Koha/AuthorisedValue.pm index c617e67..1a59b5c 100644 --- a/Koha/AuthorisedValue.pm +++ b/Koha/AuthorisedValue.pm @@ -159,9 +159,11 @@ sub _avb_resultset { } =head3 GetAuthValues + my @AuthValues = Koha::AuthorisedValue->GetAuthValues($authcat); s subroutine retrieves and returns all fields from the authorised_values table where the category is equal to the parameter $authcat, and orders the records by the value of the lib field + =cut sub GetAuthValues { @@ -177,9 +179,11 @@ sub GetAuthValues { }; =head3 GetDistinctCat + my @DistinctAuthValues = Koha::AuthorisedValue->GetDistinctCat(); This subroutine retrieves and returns all the different category values starting with 'a' in the authorised_values table + =cut sub GetDistinctCat { diff --git a/Koha/ItemType.pm b/Koha/ItemType.pm index 8d4764a..f8d44ab 100644 --- a/Koha/ItemType.pm +++ b/Koha/ItemType.pm @@ -105,9 +105,11 @@ sub can_be_deleted { } =head3 GetItemTypes + my $sth = Koha::ItemType->GetItemTypes($dbh); This subroutine retrieves and returns all values for the fields: itemtype and description in the itemtypes table. + =cut sub GetItemTypes{ diff --git a/t/db_dependent/Koha/ItemTypes.t b/t/db_dependent/Koha/ItemTypes.t index 4932950..10b65f8 100755 --- a/t/db_dependent/Koha/ItemTypes.t +++ b/t/db_dependent/Koha/ItemTypes.t @@ -19,7 +19,7 @@ use Modern::Perl; -use Test::More tests => 24; +use Test::More tests => 25; use Data::Dumper; use Koha::Database; use t::lib::Mocks; -- 2.1.4