Penambahan Akses Laman Dosen dab perbaikan fix

This commit is contained in:
Ariyutta
2026-11-09 12:01:30 +07:00
parent 33bc1233f7
commit ef46b84da8
48 changed files with 3018 additions and 131 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Tests\Feature\Auth;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
/** Akun demo (provider users) tidak punya hak akses ganda sungguhan: pemilih peran tetap prototipe. */
class RoleSwitchDemoTest extends TestCase
{
use RefreshDatabase;
public function test_demo_accounts_cannot_use_the_real_switch(): void
{
$this->actingAs(User::factory()->dosen()->create())
->post(route('peran.ganti'), ['role' => 'mahasiswa'])
->assertNotFound();
}
public function test_demo_menu_still_shows_the_prototype_notice(): void
{
$this->actingAs(User::factory()->dosen()->create())
->get(route('dosen.dashboard'))
->assertOk()
->assertSee('belum aktif pada tampilan prototipe');
}
}