mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-02-21 04:09:48 -06:00
34 lines
1.1 KiB
PHP
34 lines
1.1 KiB
PHP
<?php
|
|
|
|
uses(RefreshDatabase::class);
|
|
|
|
test('edit returns an ok response', function (): void {
|
|
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
|
|
|
$user = \App\Models\User::factory()->create();
|
|
$authUser = \App\Models\User::factory()->create();
|
|
|
|
$response = $this->actingAs($authUser)->get(route('users.passkey.edit', [$user]));
|
|
|
|
$response->assertOk();
|
|
$response->assertViewIs('user.passkey.edit');
|
|
$response->assertViewHas('user', $user);
|
|
|
|
// TODO: perform additional assertions
|
|
});
|
|
|
|
test('edit aborts with a 403', function (): void {
|
|
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
|
|
|
$user = \App\Models\User::factory()->create();
|
|
$authUser = \App\Models\User::factory()->create();
|
|
|
|
// TODO: perform additional setup to trigger `abort_unless(403)`...
|
|
|
|
$response = $this->actingAs($authUser)->get(route('users.passkey.edit', [$user]));
|
|
|
|
$response->assertForbidden();
|
|
});
|
|
|
|
// test cases...
|