Penambahan Akses Laman Dosen dab perbaikan fix
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user