create(); $throttle = 5; Config::set('2fauth.api.throttle', $throttle); $this->actingAs($user, 'api-guard'); for ($i = 0; $i < $throttle - 1; $i++) { $this->json('GET', '/api/v1/twofaccounts/count'); } $this->json('GET', '/api/v1/twofaccounts/count') ->assertOk(); $this->json('GET', '/api/v1/twofaccounts/count') ->assertStatus(429); } }