1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 21:22:40 +00:00

Test NCNv1 user query

This commit is contained in:
J. King 2018-11-06 13:21:53 -05:00
parent a8cc9a4780
commit 4869559fb3

View file

@ -928,4 +928,15 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest {
$this->assertMessage($exp, $this->req("GET", "/cleanup/after-update")); $this->assertMessage($exp, $this->req("GET", "/cleanup/after-update"));
Phake::verify(Arsse::$db)->articleCleanup(); 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);
}
} }