mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-16 09:22:22 +00:00
test(ui): hoist soft budget auth fixture out of inline mock arg
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
4728d7f609
commit
d0e7bcbb59
1 changed files with 12 additions and 10 deletions
|
|
@ -490,17 +490,19 @@ describe("KeyInfoView handleKeyUpdate empty strings", () => {
|
|||
});
|
||||
|
||||
describe("KeyInfoView handleKeyUpdate soft_budget", () => {
|
||||
const premiumAdminAuth = {
|
||||
accessToken: "access_abc",
|
||||
userId: "user_1",
|
||||
userRole: "Admin",
|
||||
premiumUser: true,
|
||||
token: "token_123",
|
||||
userEmail: "test@example.com",
|
||||
disabledPersonalKeyCreation: false,
|
||||
showSSOBanner: false,
|
||||
};
|
||||
|
||||
const renderWithSoftBudget = (softBudget: number | null) => {
|
||||
mockUseAuthorized.mockReturnValue({
|
||||
accessToken: "access_abc",
|
||||
userId: "user_1",
|
||||
userRole: "Admin",
|
||||
premiumUser: true,
|
||||
token: "token_123",
|
||||
userEmail: "test@example.com",
|
||||
disabledPersonalKeyCreation: false,
|
||||
showSSOBanner: false,
|
||||
});
|
||||
mockUseAuthorized.mockReturnValue(premiumAdminAuth);
|
||||
|
||||
return render(
|
||||
<KeyInfoView
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue