1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2025-01-03 14:32:40 +00:00

Test answering OPTIONS requests in Fever

This commit is contained in:
J. King 2019-07-24 12:32:00 -04:00
parent 61b942df70
commit 56bb460820

View file

@ -502,4 +502,13 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest {
$exp = new JsonResponse(['favicons' => [['id' => 0, 'data' => API::GENERIC_ICON_TYPE.",".API::GENERIC_ICON_DATA]]]); $exp = new JsonResponse(['favicons' => [['id' => 0, 'data' => API::GENERIC_ICON_TYPE.",".API::GENERIC_ICON_DATA]]]);
$this->assertMessage($exp, $act); $this->assertMessage($exp, $act);
} }
public function testAnswerOptionsRequest() {
$act = $this->h->dispatch($this->req("api", "", "OPTIONS"));
$exp = new EmptyResponse(204, [
'Allow' => "POST",
'Accept' => "application/x-www-form-urlencoded",
]);
$this->assertMessage($exp, $act);
}
} }