* - added some test * - cr fix * wip * wip * Update resources/js/Shared/MainMenu.vue Co-authored-by: Ewelina Lasowy <56546832+EwelinaLasowy@users.noreply.github.com> * fix Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl> Co-authored-by: Ewelina Lasowy <56546832+EwelinaLasowy@users.noreply.github.com>
		
			
				
	
	
		
			33 lines
		
	
	
		
			730 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			730 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| declare(strict_types=1);
 | |
| 
 | |
| namespace Tests\Feature;
 | |
| 
 | |
| use Illuminate\Foundation\Testing\DatabaseMigrations;
 | |
| use Tests\FeatureTestCase;
 | |
| use Toby\Eloquent\Models\User;
 | |
| 
 | |
| class MonthlyUsageTest extends FeatureTestCase
 | |
| {
 | |
|     use DatabaseMigrations;
 | |
| 
 | |
|     public function testAdministatorCanSeeVacationsMonthlyUsage(): void
 | |
|     {
 | |
|         $admin = User::factory()->admin()->create();
 | |
| 
 | |
|         $this->actingAs($admin)
 | |
|             ->get("/vacation/monthly-usage")
 | |
|             ->assertOk();
 | |
|     }
 | |
| 
 | |
|     public function testEmployeeCannotSeeVacationsMonthlyUsage(): void
 | |
|     {
 | |
|         $user = User::factory()->create();
 | |
| 
 | |
|         $this->actingAs($user)
 | |
|             ->get("/vacation/monthly-usage")
 | |
|             ->assertForbidden();
 | |
|     }
 | |
| }
 |