ran pint
This commit is contained in:
@@ -38,4 +38,4 @@ test('users can logout', function () {
|
||||
|
||||
$this->assertGuest();
|
||||
$response->assertRedirect('/');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -43,4 +43,4 @@ test('email is not verified with invalid hash', function () {
|
||||
$this->actingAs($user)->get($verificationUrl);
|
||||
|
||||
expect($user->fresh()->hasVerifiedEmail())->toBeFalse();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -29,4 +29,4 @@ test('password is not confirmed with invalid password', function () {
|
||||
]);
|
||||
|
||||
$response->assertSessionHasErrors();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -57,4 +57,4 @@ test('password can be reset with valid token', function () {
|
||||
|
||||
return true;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -22,4 +22,4 @@ test('new users can register', function () {
|
||||
assertTrue(auth()->user()->ownedOrganisations()->count() === 1);
|
||||
|
||||
$response->assertRedirect(route('dashboard', absolute: false));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -13,4 +13,4 @@ test('authenticated users can visit the dashboard', function () {
|
||||
|
||||
$response = $this->get('/dashboard');
|
||||
$response->assertStatus(200);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -4,4 +4,4 @@ test('returns a successful response', function () {
|
||||
$response = $this->get('/');
|
||||
|
||||
$response->assertStatus(200);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -5,8 +5,6 @@ use App\Data\ServerProviders\CreatedServer;
|
||||
use App\Models\Organisation;
|
||||
use App\Models\Server;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use Illuminate\Support\Str;
|
||||
use Inertia\Testing\AssertableInertia;
|
||||
|
||||
@@ -27,7 +25,7 @@ test('index route displays servers for an organisation', function () {
|
||||
|
||||
$response = $this->get(route('servers.index', ['organisation' => $organisation->id]));
|
||||
$response->assertStatus(200);
|
||||
$response->assertInertia(fn(AssertableInertia $page) => $page
|
||||
$response->assertInertia(fn (AssertableInertia $page) => $page
|
||||
->component('servers/Index'));
|
||||
});
|
||||
|
||||
@@ -35,7 +33,7 @@ test('create route returns inertia view', function () {
|
||||
$organisation = Organisation::factory()->create();
|
||||
$response = $this->get(route('servers.create', ['organisation' => $organisation->id]));
|
||||
$response->assertStatus(200);
|
||||
$response->assertInertia(fn(AssertableInertia $page) => $page
|
||||
$response->assertInertia(fn (AssertableInertia $page) => $page
|
||||
->component('servers/Create'));
|
||||
});
|
||||
|
||||
@@ -67,7 +65,7 @@ test('store route creates a server with valid data', function () {
|
||||
ipv6: '::1',
|
||||
status: 'running',
|
||||
rootPassword: Str::random(16),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$mock->shouldReceive('execute')->andReturn($providerMock);
|
||||
@@ -95,10 +93,10 @@ test('show route displays a single server', function () {
|
||||
|
||||
$response = $this->get(route('servers.show', [
|
||||
'organisation' => $organisation->id,
|
||||
'server' => $server->id
|
||||
'server' => $server->id,
|
||||
]));
|
||||
|
||||
$response->assertStatus(200);
|
||||
$response->assertInertia(fn(AssertableInertia $page) => $page
|
||||
$response->assertInertia(fn (AssertableInertia $page) => $page
|
||||
->component('servers/Show'));
|
||||
});
|
||||
|
||||
@@ -37,4 +37,4 @@ test('correct password must be provided to update password', function () {
|
||||
$response
|
||||
->assertSessionHasErrors('current_password')
|
||||
->assertRedirect('/settings/password');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -100,4 +100,4 @@ test('correct password must be provided to delete account', function () {
|
||||
->assertRedirect('/settings/profile');
|
||||
|
||||
expect($user->fresh())->not->toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
test('that true is true', function () {
|
||||
expect(true)->toBeTrue();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user