This commit is contained in:
@ -51,4 +51,18 @@ final class AuthTest extends QdbTestCase
|
||||
$res = $this->api()->request('POST', 'auth/login', ['username' => '']);
|
||||
$this->assertApiError($res, 'MISSING_FIELDS', 400);
|
||||
}
|
||||
|
||||
public function testKeycloakConfigDisabledByDefault(): void
|
||||
{
|
||||
$res = $this->api()->request('GET', 'auth/keycloak-config');
|
||||
$this->assertApiOk($res);
|
||||
$this->assertFalse($res['data']['enabled']);
|
||||
$this->assertSame('', $res['data']['loginUrl']);
|
||||
}
|
||||
|
||||
public function testKeycloakLoginRequiresConfiguration(): void
|
||||
{
|
||||
$res = $this->api()->request('GET', 'auth/keycloak-login');
|
||||
$this->assertApiError($res, 'KEYCLOAK_NOT_CONFIGURED', 503);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user