Fix bug preventing the creation of API keys with CIDR ranges

This commit is contained in:
DaneEveritt 2022-06-18 14:21:20 -04:00
parent d47a05881b
commit 7224ca81de
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
4 changed files with 211 additions and 75 deletions

View file

@ -4,12 +4,16 @@ namespace Pterodactyl\Tests\Integration;
use Carbon\CarbonImmutable;
use Pterodactyl\Tests\TestCase;
use Illuminate\Support\Facades\Event;
use Pterodactyl\Events\ActivityLogged;
use Pterodactyl\Tests\Assertions\AssertsActivityLogged;
use Pterodactyl\Tests\Traits\Integration\CreatesTestModels;
use Pterodactyl\Transformers\Api\Application\BaseTransformer;
abstract class IntegrationTestCase extends TestCase
{
use CreatesTestModels;
use AssertsActivityLogged;
protected array $connectionsToTransact = ['mysql'];
@ -17,6 +21,13 @@ abstract class IntegrationTestCase extends TestCase
'Accept' => 'application/json',
];
public function setUp(): void
{
parent::setUp();
Event::fake(ActivityLogged::class);
}
/**
* Return an ISO-8601 formatted timestamp to use in the API response.
*/