refactor: rename remaining recipient references to person/people
This commit is contained in:
@@ -5,7 +5,7 @@ import { beforeEach, describe, expect, it, vi } from "vitest"
|
||||
import { es } from "@/i18n/dictionaries/es"
|
||||
|
||||
const mocks = vi.hoisted(() => ({
|
||||
findAllWithRecipientPaginated: vi.fn(),
|
||||
findAllWithPersonPaginated: vi.fn(),
|
||||
getI18n: vi.fn(),
|
||||
refresh: vi.fn(),
|
||||
returnAssignment: vi.fn(),
|
||||
@@ -19,7 +19,7 @@ vi.mock("@/i18n/server", () => ({
|
||||
|
||||
vi.mock("@/services/assignment.service", () => ({
|
||||
AssignmentService: {
|
||||
findAllWithRecipientPaginated: mocks.findAllWithRecipientPaginated,
|
||||
findAllWithPersonPaginated: mocks.findAllWithPersonPaginated,
|
||||
},
|
||||
}))
|
||||
|
||||
@@ -65,13 +65,13 @@ describe("assignment pages localization", () => {
|
||||
"@/app/(dashboard)/assignments/page"
|
||||
)
|
||||
|
||||
mocks.findAllWithRecipientPaginated.mockResolvedValue({
|
||||
mocks.findAllWithPersonPaginated.mockResolvedValue({
|
||||
data: [
|
||||
{
|
||||
id: "assignment-1",
|
||||
quantity: 2,
|
||||
recipient: {
|
||||
id: "recipient-1",
|
||||
person: {
|
||||
id: "person-1",
|
||||
firstName: "Ada",
|
||||
lastName: "Lovelace",
|
||||
},
|
||||
@@ -93,7 +93,7 @@ describe("assignment pages localization", () => {
|
||||
|
||||
expect(html).toContain("Asignaciones")
|
||||
expect(html).toContain("Agregar asignación")
|
||||
expect(html).toContain("Destinatario")
|
||||
expect(html).toContain("Persona")
|
||||
expect(html).toContain("Artículo")
|
||||
expect(html).toContain("Número de serie")
|
||||
expect(html).toContain("Cantidad")
|
||||
@@ -110,7 +110,7 @@ describe("assignment pages localization", () => {
|
||||
"@/app/(dashboard)/assignments/page"
|
||||
)
|
||||
|
||||
mocks.findAllWithRecipientPaginated.mockResolvedValue({
|
||||
mocks.findAllWithPersonPaginated.mockResolvedValue({
|
||||
data: [],
|
||||
totalPages: 0,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user