test: add testRegisterDomainAnonymousUnauthorized

This commit is contained in:
Maël Gangloff 2025-12-08 18:42:36 +01:00
parent 1b141b6b11
commit b4c1f20d45
No known key found for this signature in database
GPG Key ID: 11FDC81C24A7F629

View File

@ -27,6 +27,16 @@ final class AutoRegisterDomainProviderTest extends ApiTestCase
$this->assertMatchesResourceItemJsonSchema(Domain::class); $this->assertMatchesResourceItemJsonSchema(Domain::class);
} }
#[DependsExternal(RDAPServiceTest::class, 'testUpdateRdapServers')]
public function testRegisterDomainAnonymousUnauthorized(): void
{
$client = $this->createClient();
$client->request('GET', '/api/domains/example.com');
$this->assertResponseStatusCodeSame(401);
}
#[DependsExternal(RDAPServiceTest::class, 'testUpdateRdapServers')] #[DependsExternal(RDAPServiceTest::class, 'testUpdateRdapServers')]
public function testRegisterDomainAlreadyUpdated(): void public function testRegisterDomainAlreadyUpdated(): void
{ {