mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
test: add gandi provider test
This commit is contained in:
@@ -32,7 +32,7 @@ final class ConnectorControllerTest extends ApiTestCase
|
||||
'waiveRetractationPeriod' => true,
|
||||
'acceptConditions' => true,
|
||||
'ownerLegalAge' => true,
|
||||
'token' => '',
|
||||
'token' => 'test',
|
||||
],
|
||||
'provider' => 'gandi',
|
||||
]]);
|
||||
@@ -69,4 +69,23 @@ final class ConnectorControllerTest extends ApiTestCase
|
||||
]]);
|
||||
$this->assertResponseStatusCodeSame(400);
|
||||
}
|
||||
|
||||
public function testCreateConnectorValidAuthData(): void
|
||||
{
|
||||
$gandiToken = static::getContainer()->getParameter('gandi_pat_token');
|
||||
if (!$gandiToken) {
|
||||
$this->markTestSkipped('Missing Gandi PAT token');
|
||||
}
|
||||
$client = ConnectorControllerTest::createClientWithCredentials(ConnectorControllerTest::getToken(UserFactory::createOne()));
|
||||
$client->request('POST', '/api/connectors', ['json' => [
|
||||
'authData' => [
|
||||
'waiveRetractationPeriod' => true,
|
||||
'acceptConditions' => true,
|
||||
'ownerLegalAge' => true,
|
||||
'token' => $gandiToken,
|
||||
],
|
||||
'provider' => 'gandi',
|
||||
]]);
|
||||
$this->assertResponseStatusCodeSame(201);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user