jdaugherty commented on code in PR #15557:
URL: https://github.com/apache/grails-core/pull/15557#discussion_r3178411277
##########
grails-test-suite-web/src/test/groovy/org/grails/web/binding/DataBindingTests.groovy:
##########
@@ -404,16 +404,10 @@ class DataBindingTests extends Specification implements
ControllerUnitTest<TestC
}
void testAssociationsBinding() {
- when:
- def authorClass = new Author()
-
- Author.metaClass.static.get = { Serializable id ->
- def result = new Author()
- result.id = id as long
- result.name = "Mocked ${id}"
- result
- }
+ given:
+ GroovySpy(Author, global: true)
Review Comment:
I don't see you cleaning up this spy
--
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]