mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
fix(#76): rotate back preview image
Some checks are pending
tests / ci (push) Waiting to run
Some checks are pending
tests / ci (push) Waiting to run
This commit is contained in:
parent
0503be65c2
commit
a88e72b75e
4 changed files with 96 additions and 2 deletions
25
tests/Feature/Devices/DeviceConfigureTest.php
Normal file
25
tests/Feature/Devices/DeviceConfigureTest.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?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 () {
|
||||
$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');
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue