first(); $account = Account::factory()->create(['plan_id' => $plan->id]); Workspace::factory()->create(['account_id' => $account->id]); Feature::for($account)->value(MonthlyCreditsLimit::class); expect(DB::table('features')->where('scope', 'account|'.$account->id)->count()) ->toBe(1); $account->forgetPlanFeatureCache(); expect(DB::table('features')->where('scope', 'account|'.$account->id)->count()) ->toBe(0); expect(Feature::for($account)->value(MonthlyCreditsLimit::class))->toBe(2500); });