Lines 40-52
my $builder = t::lib::TestBuilder->new;
Link Here
|
40 |
|
40 |
|
41 |
our @cleanup; |
41 |
our @cleanup; |
42 |
subtest 'Search patrons' => sub { |
42 |
subtest 'Search patrons' => sub { |
43 |
plan tests => 4; |
43 |
plan tests => 5; |
44 |
|
44 |
|
45 |
my @patrons; |
45 |
my @patrons; |
46 |
my $borrowernotes = q|<strong>just 'a" note</strong> \123 ❤|; |
46 |
my $borrowernotes = q|<strong>just 'a" note</strong> \123 ❤|; |
47 |
my $borrowernotes_displayed = q|just 'a" note \123 ❤|; |
47 |
my $borrowernotes_displayed = q|just 'a" note \123 ❤|; |
48 |
my $branchname = q|<strong>just 'another" library</strong> \123 ❤|; |
48 |
my $branchname = q|<strong>just 'another" library</strong> \123 ❤|; |
49 |
my $firstname = q|<strong>fir's"tname</strong> \123 ❤|; |
49 |
my $firstname = q|<strong>fir's"tname</strong> \123 ❤|; |
|
|
50 |
my $address = q|<strong>add'res"s</strong> \123 ❤|; |
50 |
my $patron_category = $builder->build_object( |
51 |
my $patron_category = $builder->build_object( |
51 |
{ class => 'Koha::Patron::Categories', category_type => 'A' } ); |
52 |
{ class => 'Koha::Patron::Categories', category_type => 'A' } ); |
52 |
my $library = $builder->build_object( |
53 |
my $library = $builder->build_object( |
Lines 63-68
subtest 'Search patrons' => sub {
Link Here
|
63 |
categorycode => $patron_category->categorycode, |
64 |
categorycode => $patron_category->categorycode, |
64 |
branchcode => $library->branchcode, |
65 |
branchcode => $library->branchcode, |
65 |
borrowernotes => $borrowernotes, |
66 |
borrowernotes => $borrowernotes, |
|
|
67 |
address => $address, |
66 |
} |
68 |
} |
67 |
} |
69 |
} |
68 |
); |
70 |
); |
Lines 78-83
subtest 'Search patrons' => sub {
Link Here
|
78 |
like ($td[2]->get_text, qr[\Q$firstname\E], |
80 |
like ($td[2]->get_text, qr[\Q$firstname\E], |
79 |
'Column "Name" should be the 3rd and contain the firstname correctly filtered' |
81 |
'Column "Name" should be the 3rd and contain the firstname correctly filtered' |
80 |
); |
82 |
); |
|
|
83 |
like ($td[2]->get_text, qr[\Q$address\E], |
84 |
'Column "Name" should be the 3rd and contain the address correctly filtered' |
85 |
); |
81 |
is( $td[5]->get_text, $branchname, |
86 |
is( $td[5]->get_text, $branchname, |
82 |
'Column "Library" should be the 6th and contain the html tags - they have been html filtered' |
87 |
'Column "Library" should be the 6th and contain the html tags - they have been html filtered' |
83 |
); |
88 |
); |
84 |
- |
|
|