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:
parent
a8cc9a4780
commit
4869559fb3
1 changed files with 11 additions and 0 deletions
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue