1
0
Fork 0
mirror of synced 2024-07-15 03:05:57 +12:00
This commit is contained in:
Adria Navarro 2024-01-26 10:56:38 +01:00
parent a555734519
commit cb53d31833
5 changed files with 11 additions and 11 deletions

View file

@ -581,7 +581,7 @@ describe.each([
tableId: InternalTable.USER_METADATA,
}
let table = await config.api.table.create({
let table = await config.api.table.save({
name: "TestTable",
type: "table",
sourceType: TableSourceType.INTERNAL,
@ -1690,7 +1690,7 @@ describe.each([
tableConfig.sourceType = TableSourceType.EXTERNAL
}
}
const table = await config.api.table.create({
const table = await config.api.table.save({
...tableConfig,
schema: {
...tableConfig.schema,

View file

@ -438,7 +438,7 @@ describe("/tables", () => {
})
it("should successfully migrate a one-to-many user relationship to a user column", async () => {
const table = await config.api.table.create({
const table = await config.api.table.save({
name: "table",
type: "table",
sourceId: INTERNAL_TABLE_SOURCE_ID,
@ -496,7 +496,7 @@ describe("/tables", () => {
// We found a bug just after releasing this feature where if the row was created from the
// users table, not the table linking to it, the migration would succeed but lose the data.
// This happened because the order of the documents in the link was reversed.
const table = await config.api.table.create({
const table = await config.api.table.save({
name: "table",
type: "table",
sourceId: INTERNAL_TABLE_SOURCE_ID,
@ -554,7 +554,7 @@ describe("/tables", () => {
})
it("should successfully migrate a many-to-many user relationship to a users column", async () => {
const table = await config.api.table.create({
const table = await config.api.table.save({
name: "table",
type: "table",
sourceId: INTERNAL_TABLE_SOURCE_ID,
@ -611,7 +611,7 @@ describe("/tables", () => {
})
it("should successfully migrate a many-to-one user relationship to a users column", async () => {
const table = await config.api.table.create({
const table = await config.api.table.save({
name: "table",
type: "table",
sourceId: INTERNAL_TABLE_SOURCE_ID,
@ -670,7 +670,7 @@ describe("/tables", () => {
describe("unhappy paths", () => {
let table: Table
beforeAll(async () => {
table = await config.api.table.create({
table = await config.api.table.save({
name: "table",
type: "table",
sourceId: INTERNAL_TABLE_SOURCE_ID,

View file

@ -67,7 +67,7 @@ describe("test the update row action", () => {
tableId: InternalTable.USER_METADATA,
}
let table = await config.api.table.create({
let table = await config.api.table.save({
name: uuid.v4(),
type: "table",
sourceType: TableSourceType.INTERNAL,
@ -120,7 +120,7 @@ describe("test the update row action", () => {
tableId: InternalTable.USER_METADATA,
}
let table = await config.api.table.create({
let table = await config.api.table.save({
name: uuid.v4(),
type: "table",
sourceType: TableSourceType.INTERNAL,

View file

@ -9,7 +9,7 @@ describe("tables", () => {
beforeAll(async () => {
await config.init()
table = await config.api.table.create(basicTable())
table = await config.api.table.save(basicTable())
})
describe("getTables", () => {

View file

@ -13,7 +13,7 @@ export class TableAPI extends TestAPI {
super(config)
}
create = async (
save = async (
data: SaveTableRequest,
{ expectStatus } = { expectStatus: 200 }
): Promise<SaveTableResponse> => {