Browse Source

Test for hot links

microsub
J. King 5 years ago
parent
commit
98fc3f4940
  1. 2
      lib/REST/Fever/API.php
  2. 8
      tests/cases/REST/Fever/TestAPI.php

2
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));

8
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"));
}
}

Loading…
Cancel
Save