From 6debdda4121acbb7ba2765a163ba96d45f17dd35 Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Tue, 31 Oct 2023 16:30:01 -0400 Subject: [PATCH] add example for top links --- t/example.t | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/t/example.t b/t/example.t index 890c4da..6ea4b4b 100644 --- a/t/example.t +++ b/t/example.t @@ -58,6 +58,14 @@ $registry->add_type( count => $xtra->{count}, total => 0+ @$data, } + }, + top_level_links => { + self => '/articles', + }, + links => { + self => sub($data,@) { + return "/articles/" . $data->{id}; + }, } } ); @@ -72,6 +80,9 @@ like $output => { "count"=> 2, "total"=> 1 }, + "links"=> { + "self"=> "/articles" + }, }; done_testing();