add test for meta
This commit is contained in:
parent
d51ee14eac
commit
0c0389f6a4
@ -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