Skip to content

Commit e9308f3

Browse files
committed
Fix tests
1 parent 22be838 commit e9308f3

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

src/services/mdm/__tests__/MdmService.spec.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,19 @@ vi.mock("../../../shared/package", () => ({
4343
},
4444
}))
4545

46+
vi.mock("../../../i18n", () => ({
47+
t: vi.fn((key: string) => {
48+
const translations: Record<string, string> = {
49+
"mdm.errors.cloud_auth_required":
50+
"Your organization requires Roo Code Cloud authentication. Please sign in to continue.",
51+
"mdm.errors.organization_mismatch":
52+
"You must be authenticated with your organization's Roo Code Cloud account.",
53+
"mdm.errors.verification_failed": "Unable to verify organization authentication.",
54+
}
55+
return translations[key] || key
56+
}),
57+
}))
58+
4659
import * as fs from "fs"
4760
import * as os from "os"
4861
import * as vscode from "vscode"
@@ -265,7 +278,7 @@ describe("MdmService", () => {
265278

266279
expect(compliance.compliant).toBe(false)
267280
if (!compliance.compliant) {
268-
expect(compliance.reason).toContain("requires Roo Code Cloud authentication")
281+
expect(compliance.reason).toContain("Your organization requires Roo Code Cloud authentication")
269282
}
270283
})
271284

@@ -287,7 +300,9 @@ describe("MdmService", () => {
287300

288301
expect(compliance.compliant).toBe(false)
289302
if (!compliance.compliant) {
290-
expect(compliance.reason).toContain("organization's Roo Code Cloud account")
303+
expect(compliance.reason).toContain(
304+
"You must be authenticated with your organization's Roo Code Cloud account",
305+
)
291306
}
292307
})
293308

0 commit comments

Comments
 (0)