Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincrozat committed Oct 25, 2023
1 parent 853315a commit 943bd71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Providers/HorizonServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ protected function gate() : void
return true;
}

return 1 === $user->id;
return 1 === $user?->id;
});
}
}
2 changes: 1 addition & 1 deletion tests/Feature/App/Providers/HorizonServiceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use function Pest\Laravel\assertGuest;

test('horizon works for users', function () {
$user = User::factory()->create();
$user = User::find(1) ?? User::factory()->create(['id' => 1]);

actingAs($user)
->getJson('/horizon')
Expand Down

0 comments on commit 943bd71

Please sign in to comment.