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:
yassin 2026-09-07 19:27:51 +00:00
parent 4728d7f609
commit d0e7bcbb59

View file

@ -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