Merge pull request #3831 from wallabag/fix/api-bad-client-id

Cast client id to avoid PG error
This commit is contained in:
Jérémy Benoist
2019-01-10 17:03:03 +01:00
committed by GitHub
3 changed files with 34 additions and 1 deletions

View File

@ -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');