From 98fc3f4940867593fe533fcd7446d5faea825742 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Mon, 8 Apr 2019 19:21:21 -0400 Subject: [PATCH] Test for hot links --- lib/REST/Fever/API.php | 2 +- tests/cases/REST/Fever/TestAPI.php | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/REST/Fever/API.php b/lib/REST/Fever/API.php index 0849f612..8c14d699 100644 --- a/lib/REST/Fever/API.php +++ b/lib/REST/Fever/API.php @@ -136,7 +136,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { } if ($G['links']) { // TODO: implement hot links - $out['inks'] = []; + $out['links'] = []; } if ($G['unread_item_ids']) { $out['unread_item_ids'] = $this->getItemIds((new Context)->unread(true)); diff --git a/tests/cases/REST/Fever/TestAPI.php b/tests/cases/REST/Fever/TestAPI.php index ffd7a631..686ef22c 100644 --- a/tests/cases/REST/Fever/TestAPI.php +++ b/tests/cases/REST/Fever/TestAPI.php @@ -366,4 +366,12 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { ]); $this->assertMessage($exp, $this->req("api&unread_item_ids")); } + + public function testListHotLinks() { + // hot links are not actually implemented, so an empty array should be all we get + $exp = new JsonResponse([ + 'links' => [] + ]); + $this->assertMessage($exp, $this->req("api&links")); + } }