Skip to content

Commit 395f598

Browse files
committed
Fixed minor issue in README.md
1 parent ce95016 commit 395f598

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,21 @@ When running a unit test, the cascade constraint isn't registered with Grails. T
5959
`org.grails.testing.GrailsUnitTest` and the following code must be added to the `setup()` method of the test:
6060

6161
```groovy
62-
import com.cscinfo.platform.constraint.CascadeConstraintRegistration
62+
import grails.cascade.validation.internal.CascadeConstraintRegistration
6363
import org.grails.datastore.gorm.validation.constraints.eval.DefaultConstraintEvaluator
6464
import org.grails.testing.GrailsUnitTest
6565
import spock.lang.Specification
6666
6767
class ParentSpec extends Specification implements GrailsUnitTest {
6868
69-
@Override
7069
Closure doWithSpring() {
7170
return {
7271
constraintEvaluator(DefaultConstraintEvaluator)
7372
}
7473
}
7574
7675
void setup() {
76+
// Important for Unit-tests as the registrations only happens when Grails context is started.
7777
CascadeConstraintRegistration.register(applicationContext)
7878
}
7979

0 commit comments

Comments
 (0)