X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=tests%2FWallabag%2FApiBundle%2FController%2FDeveloperControllerTest.php;fp=tests%2FWallabag%2FApiBundle%2FController%2FDeveloperControllerTest.php;h=e1a0ac7e49d2d1ee92405e7f3c3ab03a86e6edc2;hb=03663530edf0512cc337518d794bd3c71ebdde96;hp=f58d1c12027f9bb5a6e259311f8b9ca19206832d;hpb=ca990600da23344b9735834bb22e8658b195a55b;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php b/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php index f58d1c12..e1a0ac7e 100644 --- a/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php @@ -56,6 +56,20 @@ class DeveloperControllerTest extends WallabagCoreTestCase $this->assertArrayHasKey('refresh_token', $data); } + public function testCreateTokenWithBadClientId() + { + $client = $this->getClient(); + $client->request('POST', '/oauth/v2/token', [ + 'grant_type' => 'password', + 'client_id' => '$WALLABAG_CLIENT_ID', + 'client_secret' => 'secret', + 'username' => 'admin', + 'password' => 'mypassword', + ]); + + $this->assertSame(400, $client->getResponse()->getStatusCode()); + } + public function testListingClient() { $this->logInAs('admin');