Bug 15870: (QA followup) Add tests
authorTomas Cohen Arazi <tomascohen@unc.edu.ar>
Tue, 1 Mar 2016 13:47:32 +0000 (10:47 -0300)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Thu, 24 Mar 2016 20:15:39 +0000 (20:15 +0000)
commit590f174560029db99a5123597418675959936a07
tree17d82a6ed967c3e3bf986799c3eb3fc4197b38b3
parent25ffd8b215972add6f8ea0e6e38c3ac530745f23
 Bug 15870: (QA followup) Add tests

This patch introduces functionality tests for the new Koha::Filter.
It iterates over all the possible 'hidden' values defined in the docs
for hiding/showing fields and subfields, and checks the filter does the job.

It tests the functionality for both opac and intranet interfaces and tries
to catch all scenarios. It adds control fields to the sample record (they
traverse a different branch in the code).

TODO: Add another subfield to 245, set it to be hidden, and make sure 245 $a is still
shown.

The original tests file has been renamed conveniently.

To test:
- Run
  $ prove t/db_dependent/Filter_MARC_ViewPolicy.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
t/db_dependent/Filter_MARC_ViewPolicy.t [new file with mode: 0644]
t/db_dependent/RecordProcessor_ViewPolicy.t [deleted file]