Fixed test case and travelTo function in test cases

This commit is contained in:
Constantin Graf
2024-06-05 23:13:04 +02:00
committed by Constantin Graf
parent 86555664c5
commit b0cdeb3e33
5 changed files with 40 additions and 16 deletions

View File

@@ -13,7 +13,6 @@ use App\Models\Task;
use App\Models\TimeEntry;
use App\Models\User;
use App\Service\DashboardService;
use Carbon\CarbonImmutable;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Carbon;
use Tests\TestCase;
@@ -261,7 +260,7 @@ class DashboardServiceTest extends TestCase
{
// Arrange
// Note: Is a Monday
$now = CarbonImmutable::create(2024, 1, 1, 12, 0, 0, 'Europe/Vienna');
$now = Carbon::create(2024, 1, 1, 12, 0, 0, 'Europe/Vienna')->toImmutable();
$this->travelTo($now);
$user = User::factory()->create([
'timezone' => 'Europe/Vienna',
@@ -337,7 +336,7 @@ class DashboardServiceTest extends TestCase
{
// Arrange
// Note: Is a Monday
$now = CarbonImmutable::create(2024, 1, 1, 12, 0, 0, 'Europe/Vienna');
$now = Carbon::create(2024, 1, 1, 12, 0, 0, 'Europe/Vienna')->toImmutable();
$this->travelTo($now);
$organization = Organization::factory()->create();
$user = User::factory()->create([