#22 - wip
This commit is contained in:
parent
aae3c7fcb2
commit
1586d121f9
@ -61,6 +61,7 @@ class VacationRequestTest extends FeatureTestCase
|
|||||||
"comment" => "Comment for the vacation request.",
|
"comment" => "Comment for the vacation request.",
|
||||||
])
|
])
|
||||||
->assertSessionHasNoErrors();
|
->assertSessionHasNoErrors();
|
||||||
|
|
||||||
$this->assertDatabaseHas("vacation_requests", [
|
$this->assertDatabaseHas("vacation_requests", [
|
||||||
"user_id" => $user->id,
|
"user_id" => $user->id,
|
||||||
"year_period_id" => $currentYearPeriod->id,
|
"year_period_id" => $currentYearPeriod->id,
|
||||||
@ -89,6 +90,7 @@ class VacationRequestTest extends FeatureTestCase
|
|||||||
$this->actingAs($technicalApprover)
|
$this->actingAs($technicalApprover)
|
||||||
->post("/vacation-requests/{$vacationRequest->id}/accept-as-technical")
|
->post("/vacation-requests/{$vacationRequest->id}/accept-as-technical")
|
||||||
->assertSessionHasNoErrors();
|
->assertSessionHasNoErrors();
|
||||||
|
|
||||||
$this->assertDatabaseHas("vacation_requests", [
|
$this->assertDatabaseHas("vacation_requests", [
|
||||||
"state" => VacationRequestState::WAITING_FOR_ADMINISTRATIVE,
|
"state" => VacationRequestState::WAITING_FOR_ADMINISTRATIVE,
|
||||||
]);
|
]);
|
||||||
@ -110,6 +112,7 @@ class VacationRequestTest extends FeatureTestCase
|
|||||||
$this->actingAs($administrativeApprover)
|
$this->actingAs($administrativeApprover)
|
||||||
->post("/vacation-requests/{$vacationRequest->id}/accept-as-administrative")
|
->post("/vacation-requests/{$vacationRequest->id}/accept-as-administrative")
|
||||||
->assertSessionHasNoErrors();
|
->assertSessionHasNoErrors();
|
||||||
|
|
||||||
$this->assertDatabaseHas("vacation_requests", [
|
$this->assertDatabaseHas("vacation_requests", [
|
||||||
"state" => VacationRequestState::APPROVED,
|
"state" => VacationRequestState::APPROVED,
|
||||||
]);
|
]);
|
||||||
@ -131,6 +134,7 @@ class VacationRequestTest extends FeatureTestCase
|
|||||||
$this->actingAs($technicalApprover)
|
$this->actingAs($technicalApprover)
|
||||||
->post("/vacation-requests/{$vacationRequest->id}/reject")
|
->post("/vacation-requests/{$vacationRequest->id}/reject")
|
||||||
->assertSessionHasNoErrors();
|
->assertSessionHasNoErrors();
|
||||||
|
|
||||||
$this->assertDatabaseHas("vacation_requests", [
|
$this->assertDatabaseHas("vacation_requests", [
|
||||||
"state" => VacationRequestState::REJECTED,
|
"state" => VacationRequestState::REJECTED,
|
||||||
]);
|
]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user