Fixing test case.

This commit is contained in:
mike12345567 2021-02-16 16:46:18 +00:00
parent 2bb6e3e590
commit 1c66a6f2e2
1 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ const {
createAttachmentTable, createAttachmentTable,
makeBasicRow, makeBasicRow,
} = require("./couchTestUtils"); } = require("./couchTestUtils");
const { enrichRows } = require("../../../utilities") const { outputProcessing } = require("../../../utilities/rowProcessor")
const env = require("../../../environment") const env = require("../../../environment")
describe("/rows", () => { describe("/rows", () => {
@ -285,7 +285,7 @@ describe("/rows", () => {
link: [firstRow._id], link: [firstRow._id],
tableId: table._id, tableId: table._id,
})).body })).body
const enriched = await enrichRows(appId, table, [secondRow]) const enriched = await outputProcessing(appId, table, [secondRow])
expect(enriched[0].link.length).toBe(1) expect(enriched[0].link.length).toBe(1)
expect(enriched[0].link[0]).toBe(firstRow._id) expect(enriched[0].link[0]).toBe(firstRow._id)
}) })
@ -304,7 +304,7 @@ describe("/rows", () => {
// the environment needs configured for this // the environment needs configured for this
env.CLOUD = 1 env.CLOUD = 1
env.SELF_HOSTED = 1 env.SELF_HOSTED = 1
const enriched = await enrichRows(appId, table, [row]) const enriched = await outputProcessing(appId, table, [row])
expect(enriched[0].attachment[0].url).toBe(`/app-assets/assets/${appId}/test/thing`) expect(enriched[0].attachment[0].url).toBe(`/app-assets/assets/${appId}/test/thing`)
// remove env config // remove env config
env.CLOUD = undefined env.CLOUD = undefined