Revert "fix: make subscription panel reactive to actual tier (#7354)"

This reverts commit d3d02d0d4b.
This commit is contained in:
bymyself
2025-12-10 23:54:22 -08:00
parent d3d02d0d4b
commit 4e68a266a0
6 changed files with 57 additions and 201 deletions

View File

@@ -152,28 +152,10 @@ describe('useSubscription', () => {
expect(formattedRenewalDate.value).toBe('')
})
it('should return subscription tier from status', async () => {
vi.mocked(global.fetch).mockResolvedValue({
ok: true,
json: async () => ({
is_active: true,
subscription_id: 'sub_123',
subscription_tier: 'CREATOR',
renewal_date: '2025-11-16T12:00:00Z'
})
} as Response)
it('should format monthly price correctly', () => {
const { formattedMonthlyPrice } = useSubscription()
mockIsLoggedIn.value = true
const { subscriptionTier, fetchStatus } = useSubscription()
await fetchStatus()
expect(subscriptionTier.value).toBe('CREATOR')
})
it('should return null when subscription tier is not available', () => {
const { subscriptionTier } = useSubscription()
expect(subscriptionTier.value).toBeNull()
expect(formattedMonthlyPrice.value).toBe('$20')
})
})