feat: add fuelLog.receiptScan tier gating with pro minTier (refs #131)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,30 @@ describe('feature-tiers', () => {
|
||||
expect(feature.name).toBe('Scan for Maintenance Schedule');
|
||||
expect(feature.upgradePrompt).toBeTruthy();
|
||||
});
|
||||
|
||||
it('includes fuelLog.receiptScan feature', () => {
|
||||
const feature = FEATURE_TIERS['fuelLog.receiptScan'];
|
||||
expect(feature).toBeDefined();
|
||||
expect(feature.minTier).toBe('pro');
|
||||
expect(feature.name).toBe('Receipt Scan');
|
||||
expect(feature.upgradePrompt).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
describe('canAccessFeature - fuelLog.receiptScan', () => {
|
||||
const featureKey = 'fuelLog.receiptScan';
|
||||
|
||||
it('denies access for free tier user', () => {
|
||||
expect(canAccessFeature('free', featureKey)).toBe(false);
|
||||
});
|
||||
|
||||
it('allows access for pro tier user', () => {
|
||||
expect(canAccessFeature('pro', featureKey)).toBe(true);
|
||||
});
|
||||
|
||||
it('allows access for enterprise tier user (inherits pro)', () => {
|
||||
expect(canAccessFeature('enterprise', featureKey)).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('getTierLevel', () => {
|
||||
|
||||
Reference in New Issue
Block a user