bito-code-review[bot] commented on PR #15692:
URL: https://github.com/apache/grails-core/pull/15692#issuecomment-4602752558
<!-- Bito Reply -->
The test in question uses a mock to verify that the `deleteInstance` method
calls `instance.delete` with the expected `flush: true` parameter and avoids
the deprecated `failOnError: true` parameter. While checking the persisted
state in the database is generally more robust for integration tests, this
specific test is a unit test for the `DeleteEntityDataFetcher` class, where
mocking the `GormEntity` is a standard approach to verify the interaction
between the fetcher and the GORM API.
**grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/fetcher/impl/DeleteEntityDataFetcherSpec.groovy**
```
then: 'the delete is flushed so database failures surface, and failOnError
(ignored by delete) is not used'
1 * instance.delete([flush: true])
0 * instance.delete([failOnError: true])
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]