Bugzilla – Attachment 69806 Details for
Bug 19655
To.json doesn't escape newlines which can create invalid JSON
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19655: Use ->build instead of build_object in 16.11.x
Bug-19655-Use--build-instead-of-buildobject-in-161.patch (text/plain), 1.43 KB, created by
Chris Cormack
on 2017-12-14 21:27:05 UTC
(
hide
)
Description:
Bug 19655: Use ->build instead of build_object in 16.11.x
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2017-12-14 21:27:05 UTC
Size:
1.43 KB
patch
obsolete
>From f1a72bba4c02a8add0cd8b1480d141c724014cff Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 12 Dec 2017 10:28:40 -0300 >Subject: [PATCH] Bug 19655: Use ->build instead of build_object in 16.11.x > >The build_object method of TestBuilder has been added by bug 18182, >which is not in 16.11.x > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > t/db_dependent/Template/Plugin/To.t | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Template/Plugin/To.t b/t/db_dependent/Template/Plugin/To.t >index 033891f816..1b0321847f 100644 >--- a/t/db_dependent/Template/Plugin/To.t >+++ b/t/db_dependent/Template/Plugin/To.t >@@ -29,9 +29,9 @@ my $builder = t::lib::TestBuilder->new; > > subtest 'json' => sub { > plan tests => 1; >- my $patron = $builder->build_object( >+ my $patron = $builder->build( > { >- class => 'Koha::Patrons', >+ source => 'Borrower', > value => { > borrowernotes => q| > several >@@ -40,7 +40,7 @@ lines|, > } > ); > my $expected_escaped_notes = q|\\\\nseveral\\\\nlines|; >- is( Koha::Template::Plugin::To->json( $patron->borrowernotes ), $expected_escaped_notes ); >+ is( Koha::Template::Plugin::To->json( $patron->{borrowernotes} ), $expected_escaped_notes ); > }; > > $schema->storage->txn_rollback; >-- >2.15.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19655
:
69235
|
69244
|
69326
|
69346
|
69732
| 69806