From 12b646a38cb902e5e5d012ad35039e0eb50a64cb Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 22 Nov 2022 15:49:02 +0000 Subject: [PATCH] Bug 24606: (QA follow-up) Fix Template.t Content-Type: text/plain; charset=utf-8 The test cases here still assumed UTF-8 enocding in the middle of the process. Can be much simpler. Signed-off-by: Marcel de Rooy --- t/db_dependent/Koha/Item/Template.t | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/t/db_dependent/Koha/Item/Template.t b/t/db_dependent/Koha/Item/Template.t index 6acb5c6ad0..8174c2dd44 100755 --- a/t/db_dependent/Koha/Item/Template.t +++ b/t/db_dependent/Koha/Item/Template.t @@ -50,18 +50,8 @@ subtest 'Serializing and deserializing contents' => sub { } )->store(); - my $encoded_data; - foreach my $key ( keys %{$data} ) { - $encoded_data->{$key} = Encode::encode('UTF-8', $data->{$key}); - } - - is( $template->contents, JSON->new->utf8->encode($data), 'Contents serialized correctly' ); - - is_deeply( - $template->decoded_contents, - $encoded_data, - 'Contents deserialized and UTF-8 encoded correctly' - ); + is( $template->contents, JSON->new->encode($data), 'Contents serialized correctly' ); + is_deeply( $template->decoded_contents, $data, 'Contents deserialized correctly' ); $schema->storage->txn_rollback; }; -- 2.30.2