Merge branch 'meta'

This commit is contained in:
Yanick Champoux 2023-10-31 16:09:17 -04:00
commit c0d7724aca

View File

@ -37,4 +37,16 @@ sub schema_serialize ( $schema, $data ) {
->serialize($data); ->serialize($data);
} }
like(
Dancer2::Plugin::JsonApi::Registry::Schema->new(
type => 'thing',
top_level_meta => {
foo => 1,
bar => sub ( $data, $xtra ) {
$xtra->{bar};
}
}
)->top_level_serialize( {}, { bar => 'yup' } ),
{ meta => { foo => 1, bar => 'yup' } } );
done_testing(); done_testing();