Add test coverage for the SSH key endpoints

This commit is contained in:
DaneEveritt 2022-05-14 18:08:48 -04:00
parent 97280a62a2
commit 6554164252
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
7 changed files with 201 additions and 7 deletions

View file

@ -15,6 +15,7 @@ use Pterodactyl\Models\Location;
use Pterodactyl\Models\Schedule;
use Illuminate\Support\Collection;
use Pterodactyl\Models\Allocation;
use Pterodactyl\Models\UserSSHKey;
use Pterodactyl\Models\DatabaseHost;
use Pterodactyl\Tests\Integration\TestResponse;
use Pterodactyl\Tests\Integration\IntegrationTestCase;
@ -77,6 +78,9 @@ abstract class ClientApiIntegrationTestCase extends IntegrationTestCase
case Backup::class:
$link = "/api/client/servers/{$model->server->uuid}/backups/{$model->uuid}";
break;
case UserSSHKey::class:
$link = "/api/client/account/ssh-keys/$model->fingerprint";
break;
default:
throw new InvalidArgumentException(sprintf('Cannot create link for Model of type %s', class_basename($model)));
}