- Permissions tests #97

Merged
EwelinaLasowy merged 5 commits from permissions-tests into main 2022-03-30 09:54:29 +02:00
Showing only changes of commit 435158f426 - Show all commits

View File

@@ -436,14 +436,6 @@ class VacationRequestTest extends FeatureTestCase
{ {
$user = User::factory()->createQuietly(); $user = User::factory()->createQuietly();
$currentYearPeriod = YearPeriod::current();
VacationRequest::factory()
->count(10)
->for($user)
->for($currentYearPeriod)
->create();
$this->actingAs($user) $this->actingAs($user)
->get("/vacation-requests") ->get("/vacation-requests")
->assertRedirect("/vacation-requests/me"); ->assertRedirect("/vacation-requests/me");
@@ -520,7 +512,7 @@ class VacationRequestTest extends FeatureTestCase
$this->actingAs($user) $this->actingAs($user)
->post("/vacation-requests/{$vacationRequest->id}/cancel") ->post("/vacation-requests/{$vacationRequest->id}/cancel")
->assertStatus(403); ->assertForbidden();
} }
public function testAdministrativeApproverCanCancelVacationRequestWithApprovedStatus(): void public function testAdministrativeApproverCanCancelVacationRequestWithApprovedStatus(): void