|
Lines 29-37
my $builder = t::lib::TestBuilder->new;
Link Here
|
| 29 |
|
29 |
|
| 30 |
subtest 'json' => sub { |
30 |
subtest 'json' => sub { |
| 31 |
plan tests => 1; |
31 |
plan tests => 1; |
| 32 |
my $patron = $builder->build_object( |
32 |
my $patron = $builder->build( |
| 33 |
{ |
33 |
{ |
| 34 |
class => 'Koha::Patrons', |
34 |
source => 'Borrower', |
| 35 |
value => { |
35 |
value => { |
| 36 |
borrowernotes => q| |
36 |
borrowernotes => q| |
| 37 |
several |
37 |
several |
|
Lines 40-46
lines|,
Link Here
|
| 40 |
} |
40 |
} |
| 41 |
); |
41 |
); |
| 42 |
my $expected_escaped_notes = q|\\\\nseveral\\\\nlines|; |
42 |
my $expected_escaped_notes = q|\\\\nseveral\\\\nlines|; |
| 43 |
is( Koha::Template::Plugin::To->json( $patron->borrowernotes ), $expected_escaped_notes ); |
43 |
is( Koha::Template::Plugin::To->json( $patron->{borrowernotes} ), $expected_escaped_notes ); |
| 44 |
}; |
44 |
}; |
| 45 |
|
45 |
|
| 46 |
$schema->storage->txn_rollback; |
46 |
$schema->storage->txn_rollback; |
| 47 |
- |
|
|