feat/Update_Controllers_to_Allow_for_Premium_Membership
This commit is contained in:
@@ -22,10 +22,20 @@ public sealed class AccountPlansTests
|
||||
var free = AccountPlans.ForRoles(Array.Empty<string>());
|
||||
var premium = AccountPlans.ForRoles(new[] { "Premium" });
|
||||
|
||||
Assert.False(free.AdvancedAi);
|
||||
Assert.True(premium.AdvancedAi);
|
||||
Assert.False(free.Ai);
|
||||
Assert.Equal("free", AccountPlans.Name(free));
|
||||
Assert.Equal(0, free.MonthlyAiCalls);
|
||||
Assert.Equal(0, free.MonthlyAiTokens);
|
||||
Assert.True(premium.Ai);
|
||||
Assert.Equal("pro", AccountPlans.Name(premium));
|
||||
Assert.True(premium.MonthlyAiCalls > free.MonthlyAiCalls);
|
||||
Assert.True(premium.MonthlyAiTokens > free.MonthlyAiTokens);
|
||||
Assert.True(premium.StorageBytes > free.StorageBytes);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Admin_role_receives_pro_capabilities()
|
||||
{
|
||||
Assert.True(AccountPlans.ForRoles(new[] { "Admin" }).Ai);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user