1
0
forked from baron/baron-sso

refactor(adminfront): rename legacy companyCode to tenantSlug across frontend (#426)

This commit is contained in:
2026-03-23 16:59:05 +09:00
parent b2f96b216d
commit b0e18cc724
12 changed files with 48 additions and 48 deletions

View File

@@ -3,7 +3,7 @@ import { parseUserCSV } from "./csvParser";
describe("parseUserCSV", () => {
it("should parse valid CSV correctly", () => {
const csv = `email,name,phone,role,companyCode,department,emp_id
const csv = `email,name,phone,role,tenant,department,emp_id
user1@test.com,Hong Gil Dong,010-1111-2222,user,baron,HR,E001
user2@test.com,Kim Cheol Su,,admin,baron,IT,E002`;
@@ -15,7 +15,7 @@ user2@test.com,Kim Cheol Su,,admin,baron,IT,E002`;
name: "Hong Gil Dong",
phone: "010-1111-2222",
role: "user",
companyCode: "baron",
tenantSlug: "baron",
department: "HR",
metadata: {
emp_id: "E001",
@@ -37,10 +37,10 @@ no-name@test.com,`;
});
it("should handle mixed case headers", () => {
const csv = `EMAIL,Name,CompanyCode
const csv = `EMAIL,Name,Tenant
test@test.com,Test,baron`;
const result = parseUserCSV(csv);
expect(result[0].email).toBe("test@test.com");
expect(result[0].companyCode).toBe("baron");
expect(result[0].tenantSlug).toBe("baron");
});
});