Skip to content

Commit 380a871

Browse files
committed
fix: use id instead of _id in tests
1 parent cf4e3fb commit 380a871

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

tests/unit/drivers/MySqlDriverTest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ export default class MySqlDriverTest {
710710

711711
@Test()
712712
public async shouldBeAbleToPluckDataUsingDriver({ assert }: Context) {
713-
const data = { _id: '1', name: 'Charles Babbage' }
713+
const data = { id: '1', name: 'Charles Babbage' }
714714
await this.driver.table('users').create(data)
715715

716716
const result = await this.driver.table('users').pluck('name')
@@ -720,7 +720,7 @@ export default class MySqlDriverTest {
720720

721721
@Test()
722722
public async shouldBeAbleToPluckManyDataUsingDriver({ assert }: Context) {
723-
const data = [{ _id: '1', name: 'Charles Babbage' }]
723+
const data = [{ id: '1', name: 'Charles Babbage' }]
724724
await this.driver.table('users').createMany(data)
725725

726726
const result = await this.driver.table('users').pluckMany('name')

tests/unit/drivers/PostgresDriverTest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ export default class PostgresDriverTest {
709709

710710
@Test()
711711
public async shouldBeAbleToPluckDataUsingDriver({ assert }: Context) {
712-
const data = { _id: '1', name: 'Charles Babbage' }
712+
const data = { id: '1', name: 'Charles Babbage' }
713713
await this.driver.table('users').create(data)
714714

715715
const result = await this.driver.table('users').pluck('name')
@@ -719,7 +719,7 @@ export default class PostgresDriverTest {
719719

720720
@Test()
721721
public async shouldBeAbleToPluckManyDataUsingDriver({ assert }: Context) {
722-
const data = [{ _id: '1', name: 'Charles Babbage' }]
722+
const data = [{ id: '1', name: 'Charles Babbage' }]
723723
await this.driver.table('users').createMany(data)
724724

725725
const result = await this.driver.table('users').pluckMany('name')

tests/unit/drivers/SqliteDriverTest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ export default class SqliteDriverTest {
711711

712712
@Test()
713713
public async shouldBeAbleToPluckDataUsingDriver({ assert }: Context) {
714-
const data = { _id: '1', name: 'Charles Babbage' }
714+
const data = { id: '1', name: 'Charles Babbage' }
715715
await this.driver.table('users').create(data)
716716

717717
const result = await this.driver.table('users').pluck('name')
@@ -721,7 +721,7 @@ export default class SqliteDriverTest {
721721

722722
@Test()
723723
public async shouldBeAbleToPluckManyDataUsingDriver({ assert }: Context) {
724-
const data = [{ _id: '1', name: 'Charles Babbage' }]
724+
const data = [{ id: '1', name: 'Charles Babbage' }]
725725
await this.driver.table('users').createMany(data)
726726

727727
const result = await this.driver.table('users').pluckMany('name')

0 commit comments

Comments
 (0)