Merge branch 'meta'
This commit is contained in:
commit
c0d7724aca
@ -37,4 +37,16 @@ sub schema_serialize ( $schema, $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();
|
||||
|
Loading…
Reference in New Issue
Block a user