Bugzilla – Attachment 143990 Details for
Bug 24606
Allow storing item values as a template for creating new items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24606: (QA follow-up) Add test for encoding/decoding
Bug-24606-QA-follow-up-Add-test-for-encodingdecodi.patch (text/plain), 1.75 KB, created by
Marcel de Rooy
on 2022-11-17 10:17:16 UTC
(
hide
)
Description:
Bug 24606: (QA follow-up) Add test for encoding/decoding
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-11-17 10:17:16 UTC
Size:
1.75 KB
patch
obsolete
>From 33638f13452eb86fd949ba1cec0008a5732a9908 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 17 Nov 2022 10:15:30 +0000 >Subject: [PATCH] Bug 24606: (QA follow-up) Add test for encoding/decoding >Content-Type: text/plain; charset=utf-8 > >NOTE: I have the impression that this unit test is quite >rudimentary. I do not see the apply function tested? > >Test plan: >Run t/db_dependent/Koha/Item/Templates.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Koha/Item/Templates.t | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Koha/Item/Templates.t b/t/db_dependent/Koha/Item/Templates.t >index 1a7bc25556..dca1e66511 100755 >--- a/t/db_dependent/Koha/Item/Templates.t >+++ b/t/db_dependent/Koha/Item/Templates.t >@@ -18,6 +18,7 @@ > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >+use utf8; > > use Koha::Database; > >@@ -31,7 +32,7 @@ my $builder = t::lib::TestBuilder->new; > use_ok("Koha::Item::Templates"); > > subtest 'get_available' => sub { >- plan tests => 2; >+ plan tests => 3; > > $schema->storage->txn_begin; > >@@ -78,10 +79,12 @@ subtest 'get_available' => sub { > { > patron_id => $patron_2->id, > name => 'My template', >- contents => { location => 'test' }, >+ contents => { location => 'testð' }, > is_shared => 0, > } >- )->store(); >+ )->store; >+ $unshared_template->discard_changes; # refresh >+ is( $unshared_template->decoded_contents->{location}, 'testð', 'Tested encoding/decoding' ); > > my $templates = Koha::Item::Templates->get_available( $patron_1->id ); > is( $templates->{owned}->count, 1, "Got back one owned template" ); >-- >2.30.2
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 24606
:
141613
|
141614
|
141615
|
141616
|
141617
|
141717
|
141718
|
141719
|
141720
|
141721
|
141972
|
142003
|
142004
|
142005
|
142006
|
142007
|
142008
|
142833
|
142834
|
142835
|
142836
|
142837
|
142877
|
142878
|
142879
|
142880
|
142881
|
142882
|
142883
|
142884
|
142885
|
142886
|
142887
|
142888
|
143020
|
143569
|
143570
|
143571
|
143572
|
143573
|
143574
|
143575
|
143576
|
143577
|
143578
|
143579
|
143580
|
143581
|
143794
|
143795
|
143796
|
143989
| 143990 |
144161