feat: enforce account usage limits
CI and Deploy / test (push) Successful in 2m39s
CI and Deploy / deploy (push) Successful in 55s

This commit is contained in:
cesnimda
2026-07-30 23:14:42 +02:00
parent 9cd2e5c2e3
commit 158970fa01
7 changed files with 74 additions and 16 deletions
+19
View File
@@ -0,0 +1,19 @@
using JobTrackerApi.Models;
using Xunit;
namespace JobTrackerApi.Tests;
public sealed class AccountPlansTests
{
[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.StorageBytes > free.StorageBytes);
}
}