From 541080432dc70f4647d9c6a6a2e80f7fb340b67f Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Mon, 26 Oct 2026 23:18:34 +0100 Subject: [PATCH] test: create users by handle in the scheduled commit and preview tests #1136 and #1014 were merged with tests that still created users with a username, a column #1157 dropped when handles moved to profiles. --- tests/Feature/Controllers/UserPreviewControllerTest.php | 2 +- tests/Feature/ScheduledCommitsTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Feature/Controllers/UserPreviewControllerTest.php b/tests/Feature/Controllers/UserPreviewControllerTest.php index b11bc9052..781b41abf 100644 --- a/tests/Feature/Controllers/UserPreviewControllerTest.php +++ b/tests/Feature/Controllers/UserPreviewControllerTest.php @@ -175,7 +175,7 @@ }); it('includes the shared local time in the user preview', function (): void { - User::factory()->create(['username' => 'octocat', 'timezone' => 'Europe/Berlin', 'show_local_time' => true]); + User::factory()->create(['handle' => 'octocat', 'timezone' => 'Europe/Berlin', 'show_local_time' => true]); $this->actingAs(User::factory()->create()) ->getJson('/@octocat/preview') diff --git a/tests/Feature/ScheduledCommitsTest.php b/tests/Feature/ScheduledCommitsTest.php index 03f4c3dfc..43e327136 100644 --- a/tests/Feature/ScheduledCommitsTest.php +++ b/tests/Feature/ScheduledCommitsTest.php @@ -528,7 +528,7 @@ $this->actingAs($canceled->user)->post(route('scheduled-commit-submission.store', $canceled))->assertRedirect() ->assertInertiaFlash('toast.type', 'info')->assertInertiaFlashMissing('submitted'); $this->post(route('scheduled-commit-submission.store', $other))->assertForbidden(); - $this->actingAs(User::factory()->create(['username' => 'admin']))->post(route('scheduled-commit-submission.store', $other))->assertForbidden(); + $this->actingAs(User::factory()->create(['handle' => 'admin']))->post(route('scheduled-commit-submission.store', $other))->assertForbidden(); expect(Commit::query()->count())->toBe(0) ->and($other->fresh()->submitted_at)->toBeNull();