diff --git a/config/jetstream.php b/config/jetstream.php index 08d5ce4..7f838d2 100644 --- a/config/jetstream.php +++ b/config/jetstream.php @@ -60,7 +60,7 @@ 'features' => [ // Features::termsAndPrivacyPolicy(), // Features::profilePhotos(), - // Features::api(), + Features::api(), Features::teams(['invitations' => true]), Features::accountDeletion(), ], diff --git a/tests/Feature/ApiTokenFeatureEnabledTest.php b/tests/Feature/ApiTokenFeatureEnabledTest.php new file mode 100644 index 0000000..5f227ab --- /dev/null +++ b/tests/Feature/ApiTokenFeatureEnabledTest.php @@ -0,0 +1,31 @@ +assertTrue( + Features::hasApiFeatures(), + 'Jetstream\'s Features::api() must stay enabled, otherwise the documented '. + 'REST API has no way to issue tokens (see issue #93).' + ); + } + + public function test_authenticated_user_can_reach_the_api_tokens_page(): void + { + $this->actingAs($user = User::factory()->withPersonalTeam()->create()); + + $response = $this->get('/user/api-tokens'); + + $response->assertOk(); + } +}