mirror of
https://github.com/Karaka-Management/oms-Comments.git
synced 2026-02-05 20:28:40 +00:00
add invalid api function tests
This commit is contained in:
parent
1c120ce0c8
commit
93b0075a90
|
|
@ -248,4 +248,14 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
|||
$this->module->apiChangeCommentVote($request, $response);
|
||||
self::assertEquals($vId, $response->getDataArray('')['response']->id);
|
||||
}
|
||||
|
||||
public function testInvalidapiCommentUpdate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
$request = new HttpRequest(new HttpUri(''));
|
||||
|
||||
$request->header->account = 1;
|
||||
$this->module->apiCommentUpdate($request, $response);
|
||||
self::assertEquals(RequestStatusCode::R_400, $response->header->status);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user