#22 - vacation calendar #51

Merged
Baakoma merged 31 commits from #22-vacation-calendar into main 2022-02-15 15:08:26 +01:00
2 changed files with 3 additions and 5 deletions
Showing only changes of commit 131924da76 - Show all commits

View File

@@ -52,8 +52,8 @@ class DoesNotExceedLimitRule implements VacationRequestRule
->whereRelation(
"vacationRequest",
fn(Builder $query) => $query
->whereIn("type", $this->getLimitableVacationTypes())
->noStates(VacationRequestState::failedStates()),
->whereIn("type", $this->getLimitableVacationTypes())
->noStates(VacationRequestState::failedStates()),
)
->count();
}

View File

@@ -56,14 +56,13 @@ class VacationRequestTest extends FeatureTestCase
$currentYearPeriod = YearPeriod::current();
VacationLimit::factory([
VacationLimit::factory([
"days" => 20,
])
->for($user)
->for($currentYearPeriod)
->create();
$this->actingAs($user)
->post("/vacation-requests", [
"type" => VacationType::VACATION->value,
@@ -185,7 +184,6 @@ class VacationRequestTest extends FeatureTestCase
]);
}
public function testUserCannotCreateVacationRequestAtWeekend(): void
{
$user = User::factory()->createQuietly();