#23 - ecs fix
This commit is contained in:
@@ -26,7 +26,7 @@ class VacationLimitTest extends FeatureTestCase
|
||||
->assertInertia(
|
||||
fn(Assert $page) => $page
|
||||
->component("VacationLimits")
|
||||
->has("limits.data", 10)
|
||||
->has("limits.data", 10),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -58,14 +58,14 @@ class VacationLimitTest extends FeatureTestCase
|
||||
|
||||
$this->actingAs($admin)
|
||||
->put("/vacation-limits", [
|
||||
"items" => $data
|
||||
"items" => $data,
|
||||
])
|
||||
->assertRedirect();
|
||||
|
||||
$this->assertDatabaseHas("vacation_limits", [
|
||||
"id" => $limit1->id,
|
||||
"has_vacation" => true,
|
||||
"days" => 25,
|
||||
"id" => $limit1->id,
|
||||
"has_vacation" => true,
|
||||
"days" => 25,
|
||||
]);
|
||||
|
||||
$this->assertDatabaseHas("vacation_limits", [
|
||||
|
@@ -16,7 +16,9 @@ trait InteractsWithYearPeriods
|
||||
public function createYearPeriod(int $year): YearPeriod
|
||||
{
|
||||
/** @var YearPeriod $yearPeriod */
|
||||
$yearPeriod = YearPeriod::factory()->create(["year" => $year]);
|
||||
$yearPeriod = YearPeriod::factory()->create([
|
||||
"year" => $year,
|
||||
]);
|
||||
|
||||
return $yearPeriod;
|
||||
}
|
||||
@@ -28,7 +30,9 @@ trait InteractsWithYearPeriods
|
||||
|
||||
public function markYearPeriodAsSelected(YearPeriod $yearPeriod): void
|
||||
{
|
||||
$this->session([YearPeriodRetriever::SESSION_KEY => $yearPeriod->id]);
|
||||
$this->session([
|
||||
YearPeriodRetriever::SESSION_KEY => $yearPeriod->id,
|
||||
]);
|
||||
}
|
||||
|
||||
public function clearSelectedYearPeriod(): void
|
||||
@@ -42,4 +46,4 @@ trait InteractsWithYearPeriods
|
||||
|
||||
YearPeriod::query()->delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -9,7 +9,6 @@ use Illuminate\Support\Carbon;
|
||||
use Tests\TestCase;
|
||||
use Tests\Traits\InteractsWithYearPeriods;
|
||||
use Toby\Jobs\CheckYearPeriod;
|
||||
use Toby\Models\YearPeriod;
|
||||
|
||||
class CheckYearPeriodTest extends TestCase
|
||||
{
|
||||
|
@@ -24,7 +24,7 @@ class YearPeriodRetrieverTest extends TestCase
|
||||
public YearPeriod $nextYearPeriod;
|
||||
public YearPeriodRetriever $yearPeriodRetriever;
|
||||
|
||||
public function setUp(): void
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -64,20 +64,19 @@ class YearPeriodRetrieverTest extends TestCase
|
||||
"navigation" => [
|
||||
[
|
||||
"year" => $this->previousYearPeriod->year,
|
||||
"link" => route("year-periods.select", $this->previousYearPeriod)
|
||||
"link" => route("year-periods.select", $this->previousYearPeriod),
|
||||
],
|
||||
[
|
||||
"year" => $this->currentYearPeriod->year,
|
||||
"link" => route("year-periods.select", $this->currentYearPeriod)
|
||||
"link" => route("year-periods.select", $this->currentYearPeriod),
|
||||
],
|
||||
[
|
||||
"year" => $this->nextYearPeriod->year,
|
||||
"link" => route("year-periods.select", $this->nextYearPeriod)
|
||||
"link" => route("year-periods.select", $this->nextYearPeriod),
|
||||
],
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
|
||||
$this->assertSame($expected, $this->yearPeriodRetriever->links());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user