Update to Laravel 8
Co-authored-by: Matthew Penner <me@matthewp.io>
This commit is contained in:
parent
028921b42a
commit
a043071e3c
211 changed files with 4394 additions and 2933 deletions
|
@ -3,8 +3,8 @@
|
|||
namespace Pterodactyl\Tests\Integration\Api\Client\Server\Allocation;
|
||||
|
||||
use Illuminate\Http\Response;
|
||||
use Pterodactyl\Models\Permission;
|
||||
use Pterodactyl\Models\Allocation;
|
||||
use Pterodactyl\Models\Permission;
|
||||
use Pterodactyl\Tests\Integration\Api\Client\ClientApiIntegrationTestCase;
|
||||
|
||||
class CreateNewAllocationTest extends ClientApiIntegrationTestCase
|
||||
|
@ -33,7 +33,7 @@ class CreateNewAllocationTest extends ClientApiIntegrationTestCase
|
|||
[$user, $server] = $this->generateTestAccount($permission);
|
||||
$server->update(['allocation_limit' => 2]);
|
||||
|
||||
$response = $this->actingAs($user)->postJson($this->link($server, "/network/allocations"));
|
||||
$response = $this->actingAs($user)->postJson($this->link($server, '/network/allocations'));
|
||||
$response->assertJsonPath('object', Allocation::RESOURCE_NAME);
|
||||
|
||||
$matched = Allocation::query()->findOrFail($response->json('attributes.id'));
|
||||
|
@ -52,7 +52,7 @@ class CreateNewAllocationTest extends ClientApiIntegrationTestCase
|
|||
[$user, $server] = $this->generateTestAccount([Permission::ACTION_ALLOCATION_UPDATE]);
|
||||
$server->update(['allocation_limit' => 2]);
|
||||
|
||||
$this->actingAs($user)->postJson($this->link($server, "/network/allocations"))->assertForbidden();
|
||||
$this->actingAs($user)->postJson($this->link($server, '/network/allocations'))->assertForbidden();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -66,7 +66,7 @@ class CreateNewAllocationTest extends ClientApiIntegrationTestCase
|
|||
[$user, $server] = $this->generateTestAccount();
|
||||
$server->update(['allocation_limit' => 2]);
|
||||
|
||||
$this->actingAs($user)->postJson($this->link($server, "/network/allocations"))
|
||||
$this->actingAs($user)->postJson($this->link($server, '/network/allocations'))
|
||||
->assertStatus(Response::HTTP_BAD_REQUEST)
|
||||
->assertJsonPath('errors.0.code', 'AutoAllocationNotEnabledException')
|
||||
->assertJsonPath('errors.0.detail', 'Server auto-allocation is not enabled for this instance.');
|
||||
|
@ -81,7 +81,7 @@ class CreateNewAllocationTest extends ClientApiIntegrationTestCase
|
|||
[$user, $server] = $this->generateTestAccount();
|
||||
$server->update(['allocation_limit' => 1]);
|
||||
|
||||
$this->actingAs($user)->postJson($this->link($server, "/network/allocations"))
|
||||
$this->actingAs($user)->postJson($this->link($server, '/network/allocations'))
|
||||
->assertStatus(Response::HTTP_BAD_REQUEST)
|
||||
->assertJsonPath('errors.0.code', 'DisplayException')
|
||||
->assertJsonPath('errors.0.detail', 'Cannot assign additional allocations to this server: limit has been reached.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue