byos_laravel/tests/Feature/Devices/DeviceConfigureTest.php
Benjamin Nussbaum b4b6286172
Some checks are pending
tests / ci (push) Waiting to run
refactor: apply rector
2025-09-24 20:35:48 +02:00

25 lines
605 B
PHP

<?php
namespace Tests\Feature;
use App\Models\Device;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use function Pest\Laravel\actingAs;
uses(RefreshDatabase::class);
test('configure view displays last_refreshed_at timestamp', function (): void {
$user = User::factory()->create();
$device = Device::factory()->create([
'user_id' => $user->id,
'last_refreshed_at' => now()->subMinutes(5),
]);
$response = actingAs($user)
->get(route('devices.configure', $device));
$response->assertOk()
->assertSee('5 minutes ago');
});