diff --git a/packages/nocodb/tests/unit/model/tests/baseModelSql.test.ts b/packages/nocodb/tests/unit/model/tests/baseModelSql.test.ts index f0f8d37530..bc9a7fdfa3 100644 --- a/packages/nocodb/tests/unit/model/tests/baseModelSql.test.ts +++ b/packages/nocodb/tests/unit/model/tests/baseModelSql.test.ts @@ -176,10 +176,18 @@ function baseModelSqlTests() { const insertedRows: any[] = await baseModelSql.list(); await baseModelSql.bulkUpdate( - insertedRows.map(({ CreatedAt: _, UpdatedAt: __, ...row }) => ({ - ...row, - Title: `new-${row['Title']}`, - })), + insertedRows.map( + ({ + CreatedAt: _, + UpdatedAt: __, + CreatedBy: ___, + UpdatedBy: ____, + ...row + }) => ({ + ...row, + Title: `new-${row['Title']}`, + }), + ), { cookie: request }, ); diff --git a/packages/nocodb/tests/unit/rest/tests/columnTypeSpecific.test.ts b/packages/nocodb/tests/unit/rest/tests/columnTypeSpecific.test.ts index 3206485f17..79ca1592e2 100644 --- a/packages/nocodb/tests/unit/rest/tests/columnTypeSpecific.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/columnTypeSpecific.test.ts @@ -209,7 +209,7 @@ function columnTypeSpecificTests() { } }); - it('New record: verify system fields', async () => { + it.only('New record: verify system fields', async () => { // created-at is filled with current dateTime, last-modified-at is null // created-by is filled with current user, last-modified-by is null @@ -224,10 +224,10 @@ function columnTypeSpecificTests() { expect(unfilteredRecords[0].UpdatedAt).to.equal(null); expect(unfilteredRecords[0].CreatedBy).to.not.equal(null); - expect(unfilteredRecords[0].CreatedBy[0].email).to.equal( - 'test@example.com', + expect(unfilteredRecords[0].CreatedBy.email).to.equal( + context.user.email, ); - expect(unfilteredRecords[0].CreatedBy[0].display_name).to.equal(null); + expect(unfilteredRecords[0].CreatedBy.display_name).to.equal(null); expect(unfilteredRecords[0].UpdatedBy).to.equal(null); });