diff --git a/tests/cases/REST/NextCloudNews/TestV1_2.php b/tests/cases/REST/NextCloudNews/TestV1_2.php index 4ee6e513..e07e90be 100644 --- a/tests/cases/REST/NextCloudNews/TestV1_2.php +++ b/tests/cases/REST/NextCloudNews/TestV1_2.php @@ -928,4 +928,15 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("GET", "/cleanup/after-update")); Phake::verify(Arsse::$db)->articleCleanup(); } + + public function testQueryTheUserStatus() { + $act = $this->req("GET", "/user"); + $exp = new Response([ + 'userId' => Arsse::$user->id, + 'displayName' => Arsse::$user->id, + 'lastLoginTimestamp' => $this->approximateTime($act->getPayload()['lastLoginTimestamp'], new \DateTimeImmutable), + 'avatar' => null, + ]); + $this->assertMessage($exp, $act); + } }