toby/tests/Feature/VacationCalendarTest.php
Adrian Hopek 08421b8a69
- small changes (#98)
* - 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>
2022-03-30 10:33:18 +02:00

33 lines
789 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Feature;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Tests\FeatureTestCase;
use Toby\Eloquent\Models\User;
class VacationCalendarTest extends FeatureTestCase
{
use DatabaseMigrations;
public function testAdministrativeApproverCanDownloadTimesheet(): void
{
$administrativeApprover = User::factory()->administrativeApprover()->create();
$this->actingAs($administrativeApprover)
->get("/vacation/timesheet/january")
->assertOk();
}
public function testEmployeeCannotDownloadTimesheet(): void
{
$user = User::factory()->create();
$this->actingAs($user)
->get("/vacation/timesheet/january")
->assertForbidden();
}
}