ce76046a29
- consolidate API ownership and remove dead vendor code - add Stripe billing, learning paths, and public CV hardening - add migration, recovery, security, audit, and browser gates
32 lines
992 B
C#
32 lines
992 B
C#
using JobTrackerApi.Models;
|
|
using Xunit;
|
|
|
|
namespace JobTrackerApi.Tests;
|
|
|
|
public sealed class AccountPlansTests
|
|
{
|
|
[Theory]
|
|
[InlineData("active", true)]
|
|
[InlineData("trialing", true)]
|
|
[InlineData("past_due", false)]
|
|
[InlineData("canceled", false)]
|
|
[InlineData(null, false)]
|
|
public void Premium_subscription_status_requires_current_access(string? status, bool expected)
|
|
{
|
|
Assert.Equal(expected, AccountPlans.IsPremiumSubscriptionStatus(status));
|
|
}
|
|
|
|
[Fact]
|
|
public void Premium_role_receives_higher_cost_capabilities()
|
|
{
|
|
var free = AccountPlans.ForRoles(Array.Empty<string>());
|
|
var premium = AccountPlans.ForRoles(new[] { "Premium" });
|
|
|
|
Assert.False(free.AdvancedAi);
|
|
Assert.True(premium.AdvancedAi);
|
|
Assert.True(premium.MonthlyAiCalls > free.MonthlyAiCalls);
|
|
Assert.True(premium.MonthlyAiTokens > free.MonthlyAiTokens);
|
|
Assert.True(premium.StorageBytes > free.StorageBytes);
|
|
}
|
|
}
|