fix bug 14
Build & Push / Pipeline Tests (push) Successful in 1m52s
Test / Type Check (all packages) (push) Successful in 54s
Build & Push / Build & Push Docker Image (push) Successful in 6m34s
Test / API Unit Tests (push) Successful in 1m18s
Test / Homepage Unit Tests (push) Successful in 46s
Test / Carplace Unit Tests (push) Successful in 43s
Test / Admin Unit Tests (push) Successful in 50s
Test / Dashboard Unit Tests (push) Successful in 43s
Test / API Integration Tests (push) Successful in 1m6s

This commit is contained in:
root
2026-07-26 01:39:11 -04:00
parent 2b422ca197
commit 8046a1d447
14 changed files with 164 additions and 15 deletions
@@ -30,6 +30,16 @@ vi.mock('../../services/paypalService', () => ({
captureOrder: vi.fn(),
}))
vi.mock('../../services/stripeService', () => ({
getConfigurationStatus: vi.fn().mockReturnValue({
configured: false,
problems: ['STRIPE_API_KEY is missing', 'STRIPE_WEBHOOK_SECRET is missing'],
}),
isConfigured: vi.fn().mockReturnValue(false),
constructWebhookEvent: vi.fn(),
createCheckoutSession: vi.fn(),
}))
import request from 'supertest'
import { describe, expect, it } from 'vitest'
import { createApp } from '../../app'
@@ -40,7 +50,12 @@ describe('subscriptions public e2e smoke', () => {
it('lets an anonymous client inspect providers, plans, and features without crossing authenticated subscription routes', async () => {
const providers = await request(app).get('/api/v1/subscriptions/providers')
expect(providers.status).toBe(200)
expect(providers.body).toEqual({ data: { amanpay: false, paypal: false } })
expect(providers.body).toEqual({
data: {
stripe: false,
stripeProblems: ['STRIPE_API_KEY is missing', 'STRIPE_WEBHOOK_SECRET is missing'],
},
})
const plans = await request(app).get('/api/v1/subscriptions/plans')
expect(plans.status).toBe(200)