Lines 40-46
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 => 5; |
43 |
plan tests => 6; |
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 ❤|; |
Lines 48-53
subtest 'Search patrons' => sub {
Link Here
|
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 $address = q|<strong>add'res"s</strong> \123 ❤|; |
|
|
51 |
my $email = q|a<strong>bad_email</strong>@example\123 ❤.com|; |
51 |
my $patron_category = $builder->build_object( |
52 |
my $patron_category = $builder->build_object( |
52 |
{ class => 'Koha::Patron::Categories', category_type => 'A' } ); |
53 |
{ class => 'Koha::Patron::Categories', category_type => 'A' } ); |
53 |
my $library = $builder->build_object( |
54 |
my $library = $builder->build_object( |
Lines 65-70
subtest 'Search patrons' => sub {
Link Here
|
65 |
branchcode => $library->branchcode, |
66 |
branchcode => $library->branchcode, |
66 |
borrowernotes => $borrowernotes, |
67 |
borrowernotes => $borrowernotes, |
67 |
address => $address, |
68 |
address => $address, |
|
|
69 |
email => $email, |
68 |
} |
70 |
} |
69 |
} |
71 |
} |
70 |
); |
72 |
); |
Lines 83-88
subtest 'Search patrons' => sub {
Link Here
|
83 |
like ($td[2]->get_text, qr[\Q$address\E], |
85 |
like ($td[2]->get_text, qr[\Q$address\E], |
84 |
'Column "Name" should be the 3rd and contain the address correctly filtered' |
86 |
'Column "Name" should be the 3rd and contain the address correctly filtered' |
85 |
); |
87 |
); |
|
|
88 |
like ($td[2]->get_text, qr[\Q$email\E], |
89 |
'Column "Name" should be the 3rd and contain the email address correctly filtered' |
90 |
); |
86 |
is( $td[5]->get_text, $branchname, |
91 |
is( $td[5]->get_text, $branchname, |
87 |
'Column "Library" should be the 6th and contain the html tags - they have been html filtered' |
92 |
'Column "Library" should be the 6th and contain the html tags - they have been html filtered' |
88 |
); |
93 |
); |
89 |
- |
|
|