Fetch primaryDisplay

This commit is contained in:
Adria Navarro 2023-09-12 18:09:09 +02:00
parent a537b17b23
commit 8b644555e3
1 changed files with 6 additions and 1 deletions

View File

@ -70,6 +70,7 @@ describe.each([
name: generator.guid(), name: generator.guid(),
type: "table", type: "table",
primary: ["id"], primary: ["id"],
primaryDisplay: "name",
schema: { schema: {
id: { id: {
type: FieldType.AUTO, type: FieldType.AUTO,
@ -801,6 +802,7 @@ describe.each([
name: generator.guid(), name: generator.guid(),
type: "table", type: "table",
primary: ["id"], primary: ["id"],
primaryDisplay: "id",
schema: { schema: {
id: { id: {
type: FieldType.AUTO, type: FieldType.AUTO,
@ -836,7 +838,10 @@ describe.each([
.expect("Content-Type", /json/) .expect("Content-Type", /json/)
.expect(200) .expect(200)
expect(resBasic.body.link.length).toBe(1) expect(resBasic.body.link.length).toBe(1)
expect(resBasic.body.link[0]).toEqual({ _id: firstRow._id }) expect(resBasic.body.link[0]).toEqual({
_id: firstRow._id,
primaryDisplay: firstRow.name,
})
// test full enrichment // test full enrichment
const resEnriched = await request const resEnriched = await request