Bug 14257: Follow-up - Add documentation, fix typo, fix test
authorKatrin Fischer <Katrin.Fischer.83@web.de>
Wed, 30 Mar 2016 06:12:56 +0000 (08:12 +0200)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Thu, 31 Mar 2016 20:31:06 +0000 (20:31 +0000)
- t/db_dependent/ILSDI_Services.t was failing for me as I had
  issues in my database, fixed with another delete line
- QA tools found a typo - comparision
- Added documentation of the new parameter to the ilsdi.pl page

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt
t/db_dependent/ILSDI_Services.t

index e6544cc..993af71 100644 (file)
                                     <dd>whether or not to return hold request information in the response</dd>
                                     <dt><strong>show_loans</strong> (Optional, default 0)</dt>
                                     <dd>whether or not to return loan information in the response</dd>
+                                    <dt><strong>show_attributes</strong> (Optional, default 0)</dt>
+                                    <dd>whether or not to return extended patron attributes information in the response</dd>
                                 </dl>
                                 <h4>Example call</h4>
                                 <a href="ilsdi.pl?service=GetPatronInfo&amp;patron_id=1&amp;show_contact=0&amp;show_loans=1">
index 73313bf..ee012e2 100644 (file)
@@ -100,6 +100,7 @@ $dbh->{RaiseError} = 0;
 my $schema = Koha::Database->schema;
 $schema->storage->txn_begin;
 
+$schema->resultset( 'Issue' )->delete_all;
 $schema->resultset( 'Borrower' )->delete_all;
 $schema->resultset( 'BorrowerAttribute' )->delete_all;
 $schema->resultset( 'BorrowerAttributeType' )->delete_all;
@@ -180,7 +181,7 @@ $schema->resultset( 'Branch' )->delete_all;
 
     my $reply = C4::ILSDI::Services::GetPatronInfo( $query );
 
-    # Build a structure for comparision:
+    # Build a structure for comparison:
     my $cmp = {
         category_code     => $attr_type->{'category_code'},
         class             => $attr_type->{'class'},
@@ -193,7 +194,7 @@ $schema->resultset( 'Branch' )->delete_all;
     };
 
     # Check results:
-    is_deeply( $reply->{'attributes'}, [ $cmp ] );
+    is_deeply( $reply->{'attributes'}, [ $cmp ], 'Test GetPatronInfo - show_attributes parameter' );
 }
 
 # Cleanup