shoc-frontend-new/src/test/domain/team-members/team-member-mapper.test.ts
2026-09-16 18:54:33 -03:00

28 lines
766 B
TypeScript

import { describe, expect, it } from "vitest";
import { mapTeamMemberListItem } from "@/domain/team-members/mappers/team-member-mapper";
describe("mapTeamMemberListItem", () => {
it("maps the existing User list response and derives inactive state", () => {
expect(
mapTeamMemberListItem({
Id: "u1",
Name: "Alex Smith",
RoleName: "Dispatcher",
Locations: "Central",
Email: "alex@example.com",
Status: "Inactive",
IsAccountOwner: true,
}),
).toEqual({
id: "u1",
name: "Alex Smith",
role: "Dispatcher",
serviceArea: "Central",
phone: "",
email: "alex@example.com",
color: "",
status: "Inactive",
isAccountOwner: true,
});
});
});