Bug 24606: (QA follow-up) Fix Template.t
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 <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
5e51279ce9
commit
7c7db3eb6b
1 changed files with 2 additions and 12 deletions
|
@ -50,18 +50,8 @@ subtest 'Serializing and deserializing contents' => sub {
|
||||||
}
|
}
|
||||||
)->store();
|
)->store();
|
||||||
|
|
||||||
my $encoded_data;
|
is( $template->contents, JSON->new->encode($data), 'Contents serialized correctly' );
|
||||||
foreach my $key ( keys %{$data} ) {
|
is_deeply( $template->decoded_contents, $data, 'Contents deserialized correctly' );
|
||||||
$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'
|
|
||||||
);
|
|
||||||
|
|
||||||
$schema->storage->txn_rollback;
|
$schema->storage->txn_rollback;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue