Bug 34838: (QA follow-up): TypeDisclaimer tests - Add 'type' to request metadata

This adds a type to the request (mocking it as a new ILL request of type journal being submitted)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Pedro Amorim 2024-05-27 14:43:41 +00:00 committed by Martin Renvoize
parent ff42535f96
commit 7f8e71e82b
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -37,7 +37,8 @@ use_ok('Koha::ILL::Request::Workflow::TypeDisclaimer');
my $metadata = {
title => 'This is a title',
author => 'This is an author'
author => 'This is an author',
type => 'journal'
};
# Because hashes can reorder themselves, we need to make sure ours is in a
@ -54,7 +55,7 @@ isa_ok( $type_disclaimer, 'Koha::ILL::Request::Workflow::TypeDisclaimer' );
is(
$type_disclaimer->prep_metadata($sorted),
'eyJhdXRob3IiOiJUaGlzIGlzIGFuIGF1dGhvciIsInRpdGxlIjoiVGhpcyBpcyBhIHRpdGxlIn0%3D%0A',
'eyJhdXRob3IiOiJUaGlzIGlzIGFuIGF1dGhvciIsInRpdGxlIjoiVGhpcyBpcyBhIHRpdGxlIiwi%0AdHlwZSI6ImpvdXJuYWwifQ%3D%3D%0A',
'prep_metadata works'
);