Lines 34-39
use C4::Reserves qw (AddReserve ModReserve ModReserveAffect ModReserveStatus)
Link Here
|
34 |
use Koha::AuthUtils; |
34 |
use Koha::AuthUtils; |
35 |
use Koha::DateUtils qw( dt_from_string ); |
35 |
use Koha::DateUtils qw( dt_from_string ); |
36 |
|
36 |
|
|
|
37 |
use Koha::MarcSubfieldStructures; |
38 |
|
37 |
BEGIN { |
39 |
BEGIN { |
38 |
use_ok( |
40 |
use_ok( |
39 |
'C4::ILSDI::Services', |
41 |
'C4::ILSDI::Services', |
Lines 800-806
subtest 'Holds test with start_date and end_date' => sub {
Link Here
|
800 |
|
802 |
|
801 |
subtest 'GetRecords' => sub { |
803 |
subtest 'GetRecords' => sub { |
802 |
|
804 |
|
803 |
plan tests => 10; |
805 |
plan tests => 11; |
804 |
|
806 |
|
805 |
$schema->storage->txn_begin; |
807 |
$schema->storage->txn_begin; |
806 |
|
808 |
|
Lines 817-828
subtest 'GetRecords' => sub {
Link Here
|
817 |
} |
819 |
} |
818 |
); |
820 |
); |
819 |
|
821 |
|
|
|
822 |
my $biblio = $builder->build_sample_biblio( |
823 |
{ |
824 |
title => 'This is an awesome title', |
825 |
} |
826 |
); |
827 |
|
820 |
my $item = $builder->build_sample_item( |
828 |
my $item = $builder->build_sample_item( |
821 |
{ |
829 |
{ |
822 |
library => $branch1->{branchcode}, |
830 |
biblionumber => $biblio->biblionumber, |
|
|
831 |
library => $branch1->{branchcode}, |
823 |
} |
832 |
} |
824 |
); |
833 |
); |
825 |
|
834 |
|
|
|
835 |
my $framework_f245a = Koha::MarcSubfieldStructures->find( |
836 |
{ frameworkcode => $biblio->frameworkcode, tagfield => "245", tagsubfield => "a" } ); |
837 |
$framework_f245a->hidden('8'); |
838 |
$framework_f245a->store(); |
839 |
|
826 |
my $patron = $builder->build( |
840 |
my $patron = $builder->build( |
827 |
{ |
841 |
{ |
828 |
source => 'Borrower', |
842 |
source => 'Borrower', |
Lines 855-860
subtest 'GetRecords' => sub {
Link Here
|
855 |
|
869 |
|
856 |
my $reply = C4::ILSDI::Services::GetRecords($cgi); |
870 |
my $reply = C4::ILSDI::Services::GetRecords($cgi); |
857 |
|
871 |
|
|
|
872 |
my $opac_marcxml = $reply->{record}->[0]->{marcxml}; |
873 |
my @title_matches = ( $opac_marcxml =~ m/This is an awesome title/g ); |
874 |
is( scalar @title_matches, 0, 'Title hidden in output as expected' ); |
875 |
|
858 |
my $transfer = $item->get_transfer; |
876 |
my $transfer = $item->get_transfer; |
859 |
my $expected = { |
877 |
my $expected = { |
860 |
datesent => $transfer->datesent, |
878 |
datesent => $transfer->datesent, |
861 |
- |
|
|