Skip to content

Commit

Permalink
test(delete): remove mock call assert
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed May 26, 2024
1 parent 4ec4072 commit d822930
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tests/unit/models/builders/ModelQueryBuilderTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1001,14 +1001,12 @@ export default class ModelQueryBuilderTest {

@Test()
public async shouldBeAbleToGetSoftDeletedData({ assert }: Context) {
Mock.when(Database.driver, 'whereNull').resolve(undefined)
Mock.when(Database.driver, 'orWhereNotNull').resolve(undefined)
Mock.when(Database.driver, 'find').resolve({ id: '1' })

const result = await User.query().withTrashed().find()

assert.instanceOf(result, User)
assert.calledOnceWith(Database.driver.whereNull, 'deletedAt')
assert.calledOnceWith(Database.driver.orWhereNotNull, 'deletedAt')
}

Expand Down

0 comments on commit d822930

Please sign in to comment.