From 90117b5cd72d42141e83601a65136eda4f75ffbd Mon Sep 17 00:00:00 2001 From: "J. King" Date: Thu, 26 Nov 2020 08:42:35 -0500 Subject: [PATCH] Fix Miniflux strip value --- lib/REST.php | 2 +- tests/cases/REST/Miniflux/TestV1.php | 23 ++--------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/lib/REST.php b/lib/REST.php index 4f1f4bdd..eea62746 100644 --- a/lib/REST.php +++ b/lib/REST.php @@ -42,7 +42,7 @@ class REST { ], 'miniflux' => [ // Miniflux https://miniflux.app/docs/api.html 'match' => '/v1/', - 'strip' => '', + 'strip' => '/v1', 'class' => REST\Miniflux\V1::class, ], 'miniflux-version' => [ // Miniflux version report diff --git a/tests/cases/REST/Miniflux/TestV1.php b/tests/cases/REST/Miniflux/TestV1.php index 7d20a0a8..db8c34d9 100644 --- a/tests/cases/REST/Miniflux/TestV1.php +++ b/tests/cases/REST/Miniflux/TestV1.php @@ -53,7 +53,8 @@ class TestV1 extends \JKingWeb\Arsse\Test\AbstractTest { return $value; } - public function testSendAuthenticationChallenge(): void { + /** @dataProvider provideAuthResponses */ + public function testAuthenticateAUser(): void { $exp = new EmptyResponse(401); $this->assertMessage($exp, $this->req("GET", "/", "", [], false)); } @@ -67,27 +68,7 @@ class TestV1 extends \JKingWeb\Arsse\Test\AbstractTest { public function provideInvalidPaths(): array { return [ ["/", "GET", 404], - ["/", "POST", 404], - ["/", "PUT", 404], - ["/", "DELETE", 404], - ["/", "OPTIONS", 404], - ["/version/invalid", "GET", 404], - ["/version/invalid", "POST", 404], - ["/version/invalid", "PUT", 404], - ["/version/invalid", "DELETE", 404], - ["/version/invalid", "OPTIONS", 404], - ["/folders/1/invalid", "GET", 404], - ["/folders/1/invalid", "POST", 404], - ["/folders/1/invalid", "PUT", 404], - ["/folders/1/invalid", "DELETE", 404], - ["/folders/1/invalid", "OPTIONS", 404], ["/version", "POST", 405, "GET"], - ["/version", "PUT", 405, "GET"], - ["/version", "DELETE", 405, "GET"], - ["/folders", "PUT", 405, "GET, POST"], - ["/folders", "DELETE", 405, "GET, POST"], - ["/folders/1", "GET", 405, "PUT, DELETE"], - ["/folders/1", "POST", 405, "PUT, DELETE"], ]; }